diff options
author | Victor Stinner <vstinner@python.org> | 2021-04-16 12:33:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-16 12:33:10 (GMT) |
commit | b136b1aac4b7d07e3120ee59e41c02bc86032162 (patch) | |
tree | 5e8daa88492802a1c45b84cad0f7c4933a1394ea /Misc | |
parent | 75ec103b3adbb7c619a0e22fa60f3d34c5a9e603 (diff) | |
download | cpython-b136b1aac4b7d07e3120ee59e41c02bc86032162.zip cpython-b136b1aac4b7d07e3120ee59e41c02bc86032162.tar.gz cpython-b136b1aac4b7d07e3120ee59e41c02bc86032162.tar.bz2 |
bpo-43843: libregrtest uses threading.excepthook (GH-25400)
test.libregrtest now marks a test as ENV_CHANGED (altered the
execution environment) if a thread raises an exception but does not
catch it. It sets a hook on threading.excepthook. Use
--fail-env-changed option to mark the test as failed.
libregrtest regrtest_unraisable_hook() explicitly flushs
sys.stdout, sys.stderr and sys.__stderr__.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst b/Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst new file mode 100644 index 0000000..d1085ec --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2021-04-14-13-22-44.bpo-43843.ruIQKD.rst @@ -0,0 +1,5 @@ +:mod:`test.libregrtest` now marks a test as ENV_CHANGED (altered the execution +environment) if a thread raises an exception but does not catch it. It sets a +hook on :func:`threading.excepthook`. Use ``--fail-env-changed`` option to mark +the test as failed. +Patch by Victor Stinner. |