diff options
author | Christian Heimes <christian@python.org> | 2022-04-07 07:22:47 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-07 07:22:47 (GMT) |
commit | 2b16a08bc77475917dd5c96417aef4c5210b45ac (patch) | |
tree | 6188ad8008760a8710ba6692c44c25157c69d981 /Lib/test/test_io.py | |
parent | 5aee46b31ba37d65cdf4d5a96cabb8835c508deb (diff) | |
download | cpython-2b16a08bc77475917dd5c96417aef4c5210b45ac.zip cpython-2b16a08bc77475917dd5c96417aef4c5210b45ac.tar.gz cpython-2b16a08bc77475917dd5c96417aef4c5210b45ac.tar.bz2 |
bpo-40280: Detect missing threading on WASM platforms (GH-32352)
Co-authored-by: Brett Cannon <brett@python.org>
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r-- | Lib/test/test_io.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 67be108..29fe287 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -1451,6 +1451,7 @@ class BufferedReaderTest(unittest.TestCase, CommonBufferedTests): self.assertEqual(b"abcdefg", bufio.read()) @support.requires_resource('cpu') + @threading_helper.requires_working_threading() def test_threads(self): try: # Write out many bytes with exactly the same number of 0's, @@ -1825,6 +1826,7 @@ class BufferedWriterTest(unittest.TestCase, CommonBufferedTests): self.assertEqual(f.tell(), buffer_size + 2) @support.requires_resource('cpu') + @threading_helper.requires_working_threading() def test_threads(self): try: # Write out many bytes from many threads and test they were @@ -1895,6 +1897,7 @@ class BufferedWriterTest(unittest.TestCase, CommonBufferedTests): self.assertRaises(OSError, b.close) # exception not swallowed self.assertTrue(b.closed) + @threading_helper.requires_working_threading() def test_slow_close_from_thread(self): # Issue #31976 rawio = self.SlowFlushRawIO() @@ -3287,6 +3290,7 @@ class TextIOWrapperTest(unittest.TestCase): self.assertEqual(f.errors, "replace") @support.no_tracing + @threading_helper.requires_working_threading() def test_threads_write(self): # Issue6750: concurrent writes could duplicate data event = threading.Event() @@ -4362,9 +4366,11 @@ class CMiscIOTest(MiscIOTest): else: self.assertFalse(err.strip('.!')) + @threading_helper.requires_working_threading() def test_daemon_threads_shutdown_stdout_deadlock(self): self.check_daemon_threads_shutdown_deadlock('stdout') + @threading_helper.requires_working_threading() def test_daemon_threads_shutdown_stderr_deadlock(self): self.check_daemon_threads_shutdown_deadlock('stderr') |