summaryrefslogtreecommitdiffstats
path: root/Lib/test/audit-tests.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-11-03 07:45:53 (GMT)
committerGitHub <noreply@github.com>2023-11-03 07:45:53 (GMT)
commit26c0e5e03a8603eccfd98045bc69fde2e24682e3 (patch)
tree01d7dc811329b0387323350fa881a3301affe461 /Lib/test/audit-tests.py
parent0d3df272fbd131bff7f02d4d4279ad1e35081121 (diff)
downloadcpython-26c0e5e03a8603eccfd98045bc69fde2e24682e3.zip
cpython-26c0e5e03a8603eccfd98045bc69fde2e24682e3.tar.gz
cpython-26c0e5e03a8603eccfd98045bc69fde2e24682e3.tar.bz2
gh-108082: Remove _PyErr_WriteUnraisableMsg() (GH-111643)
Replace the remaining calls with PyErr_FormatUnraisable().
Diffstat (limited to 'Lib/test/audit-tests.py')
-rw-r--r--Lib/test/audit-tests.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/audit-tests.py b/Lib/test/audit-tests.py
index f0cedde..89f407d 100644
--- a/Lib/test/audit-tests.py
+++ b/Lib/test/audit-tests.py
@@ -289,7 +289,7 @@ def test_excepthook():
def test_unraisablehook():
- from _testinternalcapi import write_unraisable_exc
+ from _testcapi import err_formatunraisable
def unraisablehook(hookargs):
pass
@@ -302,7 +302,8 @@ def test_unraisablehook():
sys.addaudithook(hook)
sys.unraisablehook = unraisablehook
- write_unraisable_exc(RuntimeError("nonfatal-error"), "for audit hook test", None)
+ err_formatunraisable(RuntimeError("nonfatal-error"),
+ "Exception ignored for audit hook test")
def test_winreg():