Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4f92a68

Browse files
committed
Issue #14080: fix sporadic test_imp failure. Patch by Stefan Krah.
1 parent 9578757 commit 4f92a68

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/test/test_imp.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,7 @@ def cleanup():
325325
self.addCleanup(cleanup)
326326
# Touch the __init__.py file.
327327
support.create_empty_file('pep3147/__init__.py')
328+
importlib.invalidate_caches()
328329
expected___file__ = os.sep.join(('.', 'pep3147', '__init__.py'))
329330
m = __import__('pep3147')
330331
self.assertEqual(m.__file__, expected___file__, (m.__file__, m.__path__))

0 commit comments

Comments
 (0)