summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2022-05-25 22:12:54 (GMT)
committerGitHub <noreply@github.com>2022-05-25 22:12:54 (GMT)
commit518595652759462b13904df767f69b8cc2c61143 (patch)
tree28cf498655b4c223ab6e6daab68408663a196c3f /Lib/test/test_io.py
parentca58e4a2c596d1b4cdcae9ec92844d3d3272c4ce (diff)
downloadcpython-518595652759462b13904df767f69b8cc2c61143.zip
cpython-518595652759462b13904df767f69b8cc2c61143.tar.gz
cpython-518595652759462b13904df767f69b8cc2c61143.tar.bz2
gh-69443: Add test.support.Py_DEBUG constant (#93226)
Diffstat (limited to 'Lib/test/test_io.py')
-rw-r--r--Lib/test/test_io.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index daccbae..129734b 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -68,7 +68,7 @@ else:
# Does io.IOBase finalizer log the exception if the close() method fails?
# The exception is ignored silently by default in release build.
-IOBASE_EMITS_UNRAISABLE = (hasattr(sys, "gettotalrefcount") or sys.flags.dev_mode)
+IOBASE_EMITS_UNRAISABLE = (support.Py_DEBUG or sys.flags.dev_mode)
def _default_chunk_size():