summaryrefslogtreecommitdiff
path: root/Lib/test/test_reprlib.py
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-02-20 01:48:16 +0100
committerAntoine Pitrou <solipsis@pitrou.net>2012-02-20 01:48:16 +0100
commitab0490950e51c9b7e652761f409b8267b6abb458 (patch)
treec06c41660ea8503c21fe54f54a607897c6aa7939 /Lib/test/test_reprlib.py
parentc744cf037db6fb8f0af5c02098e97b4e8657e392 (diff)
downloadcpython-ab0490950e51c9b7e652761f409b8267b6abb458.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.py2
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 = []