diff options
author | Victor Stinner <vstinner@python.org> | 2022-05-25 22:12:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-25 22:12:54 (GMT) |
commit | 518595652759462b13904df767f69b8cc2c61143 (patch) | |
tree | 28cf498655b4c223ab6e6daab68408663a196c3f /Lib/test/test_warnings | |
parent | ca58e4a2c596d1b4cdcae9ec92844d3d3272c4ce (diff) | |
download | cpython-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_warnings')
-rw-r--r-- | Lib/test/test_warnings/__init__.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index 0f960b8..b00ddd5 100644 --- a/Lib/test/test_warnings/__init__.py +++ b/Lib/test/test_warnings/__init__.py @@ -22,8 +22,6 @@ py_warnings = import_helper.import_fresh_module('warnings', c_warnings = import_helper.import_fresh_module('warnings', fresh=['_warnings']) -Py_DEBUG = hasattr(sys, 'gettotalrefcount') - @contextmanager def warnings_state(module): """Use a specific warnings implementation in warning_tests.""" @@ -1191,7 +1189,7 @@ class EnvironmentVariableTests(BaseTest): def test_default_filter_configuration(self): pure_python_api = self.module is py_warnings - if Py_DEBUG: + if support.Py_DEBUG: expected_default_filters = [] else: if pure_python_api: |