diff options
| author | Antoine Pitrou <solipsis@pitrou.net> | 2012-02-20 01:48:16 +0100 |
|---|---|---|
| committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-02-20 01:48:16 +0100 |
| commit | c541f8ef40634c379aab0e4537777203a910d355 (patch) | |
| tree | 9b731dfbfc79f8c7ae11ec43d7f7914b4d32082b /Lib/test/test_reprlib.py | |
| parent | 336b2f45e5c1212470b1b443a92d953f026b951e (diff) | |
| download | cpython-git-c541f8ef40634c379aab0e4537777203a910d355.tar.gz | |
Issue #14043: Speed up importlib's _FileFinder by at least 8x, and add a new importlib.invalidate_caches() function.
importlib is now often faster than imp.find_module() at finding modules.
Diffstat (limited to 'Lib/test/test_reprlib.py')
| -rw-r--r-- | Lib/test/test_reprlib.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/test/test_reprlib.py b/Lib/test/test_reprlib.py index 0365cea5ff..e75ba1ce90 100644 --- a/Lib/test/test_reprlib.py +++ b/Lib/test/test_reprlib.py @@ -6,6 +6,7 @@ import sys import os import shutil +import importlib import unittest from test.support import run_unittest, create_empty_file @@ -212,6 +213,7 @@ class LongReprTest(unittest.TestCase): # Remember where we are self.here = os.getcwd() sys.path.insert(0, self.here) + importlib.invalidate_caches() def tearDown(self): actions = [] |
