(self)
| 359 | |
| 360 | @unittest.skipUnless(support.MS_WINDOWS, 'This test only makes sense on Windows') |
| 361 | def test_win32_ver(self): |
| 362 | release1, version1, csd1, ptype1 = 'a', 'b', 'c', 'd' |
| 363 | res = platform.win32_ver(release1, version1, csd1, ptype1) |
| 364 | self.assertEqual(len(res), 4) |
| 365 | release, version, csd, ptype = res |
| 366 | if release: |
| 367 | # Currently, release names always come from internal dicts, |
| 368 | # but this could change over time. For now, we just check that |
| 369 | # release is something different from what we have passed. |
| 370 | self.assertNotEqual(release, release1) |
| 371 | if version: |
| 372 | # It is rather hard to test explicit version without |
| 373 | # going deep into the details. |
| 374 | self.assertIn('.', version) |
| 375 | for v in version.split('.'): |
| 376 | int(v) # should not fail |
| 377 | if csd: |
| 378 | self.assertTrue(csd.startswith('SP'), msg=csd) |
| 379 | if ptype: |
| 380 | if os.cpu_count() > 1: |
| 381 | self.assertIn('Multiprocessor', ptype) |
| 382 | else: |
| 383 | self.assertIn('Uniprocessor', ptype) |
| 384 | |
| 385 | @unittest.skipIf(support.MS_WINDOWS, 'This test only makes sense on non Windows') |
| 386 | def test_win32_ver_on_non_windows(self): |
nothing calls this directly
no test coverage detected