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. ........
This commit is contained in:
parent
8baa745ceb
commit
6e064bd1ab
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue