diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py index 8dd8d1e8970..09ce6b67606 100644 --- a/Lib/test/test_thread.py +++ b/Lib/test/test_thread.py @@ -174,11 +174,7 @@ class TestForkInThread(unittest.TestCase): def setUp(self): self.read_fd, self.write_fd = os.pipe() - def test_forkinthread(self): - if sys.platform.startswith('win'): - from test.test_support import TestSkipped - raise TestSkipped("This test is only appropriate for " - "POSIX-like systems.") + def _test_forkinthread(self): def thread1(): try: pid = os.fork() # fork in a thread @@ -196,6 +192,9 @@ class TestForkInThread(unittest.TestCase): self.assertEqual(os.read(self.read_fd, 2), "OK", "Unable to fork() in thread") + if sys.platform.startswith('win'): + test_forkinthread = _test_forkinthread + def tearDown(self): try: os.close(self.read_fd)