Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(86227)

Unified Diff: Lib/test/test_threading.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/test/test_sys.py ('k') | Lib/test/test_thread.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/test/test_threading.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/test/test_threading.py Wed Mar 02 00:01:35 2016 +0000
@@ -820,16 +820,17 @@ class ThreadJoinOnShutdown(BaseTestCase)
self.assertEqual(0, status)
for t in threads:
t.join()
class SubinterpThreadingTests(BaseTestCase):
+ @unittest.skipIf(sys.platform == 'ios', "iOS doesn't have os.pipe")
def test_threads_join(self):
# Non-daemon threads should be joined at subinterpreter shutdown
# (issue #18808)
r, w = os.pipe()
self.addCleanup(os.close, r)
self.addCleanup(os.close, w)
code = r"""if 1:
import os
@@ -843,16 +844,17 @@ class SubinterpThreadingTests(BaseTestCa
os.write(%d, b"x")
threading.Thread(target=f).start()
""" % (w,)
ret = test.support.run_in_subinterp(code)
self.assertEqual(ret, 0)
# The thread was joined properly.
self.assertEqual(os.read(r, 1), b"x")
+ @unittest.skipIf(sys.platform == 'ios', "iOS doesn't have os.pipe")
def test_threads_join_2(self):
# Same as above, but a delay gets introduced after the thread's
# Python code returned but before the thread state is deleted.
# To achieve this, we register a thread-local object which sleeps
# a bit when deallocated.
r, w = os.pipe()
self.addCleanup(os.close, r)
self.addCleanup(os.close, w)
« no previous file with comments | « Lib/test/test_sys.py ('k') | Lib/test/test_thread.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+