diff options
author | Hugo van Kemenade <hugovk@users.noreply.github.com> | 2022-05-03 10:17:54 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-03 10:17:54 +0300 |
commit | 9b027d4cea57e98c76f5176cc3188dc81603356c (patch) | |
tree | 1306b7c7cc75ce99c311ec8f8085e2e9b145de82 /Lib/test/test_imp.py | |
parent | c1767fce521f5d4f175082d0747cfa48542aea3a (diff) | |
download | cpython-git-9b027d4cea57e98c76f5176cc3188dc81603356c.tar.gz |
gh-92169: Use warnings_helper.import_deprecated() to import deprecated modules uniformly in tests (GH-92170)
Diffstat (limited to 'Lib/test/test_imp.py')
-rw-r--r-- | Lib/test/test_imp.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_imp.py b/Lib/test/test_imp.py index 35e9a2a186..d44dc6b49f 100644 --- a/Lib/test/test_imp.py +++ b/Lib/test/test_imp.py @@ -8,11 +8,10 @@ from test import support from test.support import import_helper from test.support import os_helper from test.support import script_helper +from test.support import warnings_helper import unittest import warnings -with warnings.catch_warnings(): - warnings.simplefilter('ignore', DeprecationWarning) - import imp +imp = warnings_helper.import_deprecated('imp') import _imp |