Fix test to be skipped on windows.

This commit is contained in:
Gregory P. Smith 2010-03-01 06:01:02 +00:00
parent 6a65f85e79
commit 7512a9068d
1 changed files with 2 additions and 4 deletions

View 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