mirror of
https://github.com/python/cpython.git
synced 2025-10-12 01:43:12 +00:00
gh-116682: stdout may be empty in test_cancel_futures_wait_false (#116683)
If the `shutdown()` call happens before the worker thread starts executing the task, then nothing will be printed to stdout.
This commit is contained in:
parent
3f54d1cfe7
commit
7d1abe9502
1 changed files with 3 additions and 1 deletions
|
@ -247,7 +247,9 @@ class ThreadPoolShutdownTest(ThreadPoolMixin, ExecutorShutdownTest, BaseTestCase
|
||||||
# Errors in atexit hooks don't change the process exit code, check
|
# Errors in atexit hooks don't change the process exit code, check
|
||||||
# stderr manually.
|
# stderr manually.
|
||||||
self.assertFalse(err)
|
self.assertFalse(err)
|
||||||
self.assertEqual(out.strip(), b"apple")
|
# gh-116682: stdout may be empty if shutdown happens before task
|
||||||
|
# starts executing.
|
||||||
|
self.assertIn(out.strip(), [b"apple", b""])
|
||||||
|
|
||||||
|
|
||||||
class ProcessPoolShutdownTest(ExecutorShutdownTest):
|
class ProcessPoolShutdownTest(ExecutorShutdownTest):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue