diff options
author | Karthikeyan Singaravelan <tir.karthi@gmail.com> | 2020-10-09 10:08:42 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-09 10:08:42 (GMT) |
commit | c6f41e62f55933f9735e9b9c103c6860685b028a (patch) | |
tree | a2062e1a168188d0395c8f75aa607979a7efc08e /Lib/test | |
parent | 3da210b69f76bdd7f4e7fa2e3a12eab4dd478ed2 (diff) | |
download | cpython-c6f41e62f55933f9735e9b9c103c6860685b028a.zip cpython-c6f41e62f55933f9735e9b9c103c6860685b028a.tar.gz cpython-c6f41e62f55933f9735e9b9c103c6860685b028a.tar.bz2 |
[3.9] bpo-41970: Avoid test failure in test_lib2to3 if the module is already imported (GH-22595) (GH-22609)
(cherry picked from commit 4a9f82f50d957b6cf3fd207de8b583d9137316b8)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_lib2to3.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_lib2to3.py b/Lib/test/test_lib2to3.py index 15c317e..e939d47 100644 --- a/Lib/test/test_lib2to3.py +++ b/Lib/test/test_lib2to3.py @@ -1,8 +1,8 @@ import unittest -from test.support import check_warnings +from test.support import check_warnings, import_fresh_module with check_warnings(("", PendingDeprecationWarning)): - from lib2to3.tests import load_tests + load_tests = import_fresh_module('lib2to3.tests', fresh=['lib2to3']).load_tests if __name__ == '__main__': unittest.main() |