(self)
| 401 | |
| 402 | @unittest.skipUnless(support.MS_WINDOWS, 'This test only makes sense on Windows') |
| 403 | def test_win32_ver(self): |
| 404 | release1, version1, csd1, ptype1 = 'a', 'b', 'c', 'd' |
| 405 | res = platform.win32_ver(release1, version1, csd1, ptype1) |
| 406 | self.assertEqual(len(res), 4) |
| 407 | release, version, csd, ptype = res |
| 408 | if release: |
| 409 | # Currently, release names always come from internal dicts, |
| 410 | # but this could change over time. For now, we just check that |
| 411 | # release is something different from what we have passed. |
| 412 | self.assertNotEqual(release, release1) |
| 413 | if version: |
| 414 | # It is rather hard to test explicit version without |
| 415 | # going deep into the details. |
| 416 | self.assertIn('.', version) |
| 417 | for v in version.split('.'): |
| 418 | int(v) # should not fail |
| 419 | if csd: |
| 420 | self.assertStartsWith(csd, 'SP') |
| 421 | if ptype: |
| 422 | if os.cpu_count() > 1: |
| 423 | self.assertIn('Multiprocessor', ptype) |
| 424 | else: |
| 425 | self.assertIn('Uniprocessor', ptype) |
| 426 | |
| 427 | @unittest.skipIf(support.MS_WINDOWS, 'This test only makes sense on non Windows') |
| 428 | def test_win32_ver_on_non_windows(self): |
nothing calls this directly
no test coverage detected