summaryrefslogtreecommitdiff
path: root/Lib/test/test_reprlib.py
diff options
context:
space:
mode:
authorZachary Ware <zachary.ware@gmail.com>2013-12-08 00:44:27 -0600
committerZachary Ware <zachary.ware@gmail.com>2013-12-08 00:44:27 -0600
commit498289b4fc9f76d201782a4955ebfd6d6cc2faf2 (patch)
tree4648d6f83d7ac8f0b2d21d347c9d5fea6d2f60a7 /Lib/test/test_reprlib.py
parent4661ee73929e25fbaa6a5ac4aff490ff783616a9 (diff)
parent1cd17e53a3ef332cc052a7c66ddc8e76da7de591 (diff)
downloadcpython-498289b4fc9f76d201782a4955ebfd6d6cc2faf2.tar.gz
Issue 19572: More silently skipped tests explicitly skipped.
Diffstat (limited to 'Lib/test/test_reprlib.py')
-rw-r--r--Lib/test/test_reprlib.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_reprlib.py b/Lib/test/test_reprlib.py
index 7bf224735e..5b81ce770c 100644
--- a/Lib/test/test_reprlib.py
+++ b/Lib/test/test_reprlib.py
@@ -3,11 +3,11 @@
Nick Mathewson
"""
-import imp
import sys
import os
import shutil
import importlib
+import importlib.util
import unittest
from test.support import run_unittest, create_empty_file, verbose
@@ -242,7 +242,8 @@ class LongReprTest(unittest.TestCase):
source_path_len += 2 * (len(self.longname) + 1)
# a path separator + `module_name` + ".py"
source_path_len += len(module_name) + 1 + len(".py")
- cached_path_len = source_path_len + len(imp.cache_from_source("x.py")) - len("x.py")
+ cached_path_len = (source_path_len +
+ len(importlib.util.cache_from_source("x.py")) - len("x.py"))
if os.name == 'nt' and cached_path_len >= 258:
# Under Windows, the max path len is 260 including C's terminating
# NUL character.
@@ -253,6 +254,7 @@ class LongReprTest(unittest.TestCase):
print("cached_path_len =", cached_path_len)
def test_module(self):
+ self.maxDiff = None
self._check_path_limitations(self.pkgname)
create_empty_file(os.path.join(self.subpkgname, self.pkgname + '.py'))
importlib.invalidate_caches()