summaryrefslogtreecommitdiffstats
path: root/Lib/test/libregrtest
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r--Lib/test/libregrtest/setup.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/libregrtest/setup.py b/Lib/test/libregrtest/setup.py
index 9a6585a..8493114 100644
--- a/Lib/test/libregrtest/setup.py
+++ b/Lib/test/libregrtest/setup.py
@@ -107,6 +107,12 @@ def setup_tests(ns):
support.use_resources = ns.use_resources
+ if hasattr(sys, 'addaudithook'):
+ # Add an auditing hook for all tests to ensure PySys_Audit is tested
+ def _test_audit_hook(name, args):
+ pass
+ sys.addaudithook(_test_audit_hook)
+
def replace_stdout():
"""Set stdout encoder error handler to backslashreplace (as stderr error