]> granicus.if.org Git - python/commitdiff
Fix test to be skipped on windows.
authorGregory P. Smith <greg@mad-scientist.com>
Mon, 1 Mar 2010 06:01:02 +0000 (06:01 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Mon, 1 Mar 2010 06:01:02 +0000 (06:01 +0000)
Lib/test/test_thread.py

index 4e707e5a13f162833ae9daa99bee0cdf27e36711..b476317d5ec7d6b8446b80f1d0b7a205a9028efd 100644 (file)
@@ -201,11 +201,9 @@ class TestForkInThread(unittest.TestCase):
     def setUp(self):
         self.read_fd, self.write_fd = os.pipe()
 
+    @unittest.skipIf(sys.platform.startswith('win'),
+                    "This test is only appropriate for POSIX-like systems.")
     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 thread1():
             try:
                 pid = os.fork() # fork in a thread