Commits

Anonymous committed 4e30431

Merged revisions 78550 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
r78550 | gregory.p.smith | 2010-02-28 22:01:02 -0800 (Sun, 28 Feb 2010) | 2 lines

Fix test to be skipped on windows.
........

Comments (0)

Files changed (1)

Lib/test/test_thread.py

     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
         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)