[Python-checkins] r78551 - in python/branches/release26-maint: Lib/test/test_thread.py
gregory.p.smith
python-checkins at python.org
Mon Mar 1 07:03:45 CET 2010
Author: gregory.p.smith
Date: Mon Mar 1 07:03:44 2010
New Revision: 78551
Log:
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.
........
Modified:
python/branches/release26-maint/ (props changed)
python/branches/release26-maint/Lib/test/test_thread.py
Modified: python/branches/release26-maint/Lib/test/test_thread.py
==============================================================================
--- python/branches/release26-maint/Lib/test/test_thread.py (original)
+++ python/branches/release26-maint/Lib/test/test_thread.py Mon Mar 1 07:03:44 2010
@@ -174,11 +174,7 @@
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 @@
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)
More information about the Python-checkins
mailing list