diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-12 17:21:43 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-07-12 17:21:43 (GMT) |
commit | 021548cf4c65bf6b87bf9916c52fe7c3694dd408 (patch) | |
tree | 498633000ca25237f05dd9933b81f0b3d7843d9a /Lib | |
parent | 673eb6a0bbf9708d89ead5ca4c0e5a5c349b79dd (diff) | |
download | cpython-021548cf4c65bf6b87bf9916c52fe7c3694dd408.zip cpython-021548cf4c65bf6b87bf9916c52fe7c3694dd408.tar.gz cpython-021548cf4c65bf6b87bf9916c52fe7c3694dd408.tar.bz2 |
Try to fix or diagnose buildbot failures
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_import.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_import.py b/Lib/test/test_import.py index 1091158..ed60008 100644 --- a/Lib/test/test_import.py +++ b/Lib/test/test_import.py @@ -194,6 +194,7 @@ class ImportTests(unittest.TestCase): # New in 2.4, we shouldn't be able to import that no matter how often # we try. sys.path.insert(0, os.curdir) + importlib.invalidate_caches() if TESTFN in sys.modules: del sys.modules[TESTFN] try: @@ -465,7 +466,11 @@ class PathsTests(unittest.TestCase): unc += path[2:] sys.path.append(unc) try: - mod = __import__("test_trailing_slash") + try: + mod = __import__("test_trailing_slash") + except ImportError as e: + self.fail("could not import 'test_trailing_slash' from %r: %r" + % (unc, e)) self.assertEqual(mod.testdata, 'test_trailing_slash') unload("test_trailing_slash") finally: |