| 468 | @warnings_helper.ignore_fork_in_thread_deprecation_warnings() |
| 469 | @unittest.skipUnless(sys.platform == 'darwin', "OSX only test") |
| 470 | def test_mac_ver_with_fork(self): |
| 471 | # Issue7895: platform.mac_ver() crashes when using fork without exec |
| 472 | # |
| 473 | # This test checks that the fix for that issue works. |
| 474 | # |
| 475 | pid = os.fork() |
| 476 | if pid == 0: |
| 477 | # child |
| 478 | info = platform.mac_ver() |
| 479 | os._exit(0) |
| 480 | |
| 481 | else: |
| 482 | # parent |
| 483 | support.wait_process(pid, exitcode=0) |
| 484 | |
| 485 | def test_ios_ver(self): |
| 486 | result = platform.ios_ver() |