]> granicus.if.org Git - python/commitdiff
Merged revisions 78550 via svnmerge from
authorGregory P. Smith <greg@mad-scientist.com>
Mon, 1 Mar 2010 06:03:44 +0000 (06:03 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Mon, 1 Mar 2010 06:03:44 +0000 (06:03 +0000)
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.
........

Lib/test/test_thread.py

index 8dd8d1e897011ceaaf8767f3c391a2a59c30a584..09ce6b676063482a2b8e397ae95c3c86f6c27397 100644 (file)
@@ -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)