mirror of
https://github.com/python/cpython.git
synced 2025-08-30 21:48:47 +00:00
Correct a failing test when test_import is run after test_coding:
be sure to import a fresh module by removing it from sys.modules
This commit is contained in:
parent
cf171a7fbc
commit
dd9e3b8736
2 changed files with 9 additions and 4 deletions
|
@ -54,6 +54,8 @@ class ImportTest(unittest.TestCase):
|
|||
print("b =", b, file=f)
|
||||
f.close()
|
||||
|
||||
if TESTFN in sys.modules:
|
||||
del sys.modules[TESTFN]
|
||||
try:
|
||||
try:
|
||||
mod = __import__(TESTFN)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue