summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3')
-rw-r--r--Lib/lib2to3/fixes/fix_imports.py5
-rwxr-xr-xLib/lib2to3/tests/test_fixers.py5
2 files changed, 6 insertions, 4 deletions
diff --git a/Lib/lib2to3/fixes/fix_imports.py b/Lib/lib2to3/fixes/fix_imports.py
index b4a137b..94b2311 100644
--- a/Lib/lib2to3/fixes/fix_imports.py
+++ b/Lib/lib2to3/fixes/fix_imports.py
@@ -19,6 +19,11 @@ builtin_names = [name for name in dir(__builtin__)
# XXX: overhead to the fixer.
MAPPING = {"StringIO": ("io", ["StringIO"]),
"cStringIO": ("io", ["StringIO"]),
+ "cPickle": ("pickle", ['BadPickleGet', 'HIGHEST_PROTOCOL',
+ 'PickleError', 'Pickler', 'PicklingError',
+ 'UnpickleableError', 'Unpickler', 'UnpicklingError',
+ 'compatible_formats', 'dump', 'dumps', 'format_version',
+ 'load', 'loads']),
"__builtin__" : ("builtins", builtin_names),
'copy_reg': ('copyreg', ['pickle',
'constructor',
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py
index bb5c79a..3ed8cd5 100755
--- a/Lib/lib2to3/tests/test_fixers.py
+++ b/Lib/lib2to3/tests/test_fixers.py
@@ -1405,10 +1405,7 @@ class Test_xreadlines(FixerTestCase):
s = "foo(xreadlines)"
self.unchanged(s)
-# Disable test, as it takes a too long time to run, and also
-# fails in 2.6.
-#class Test_imports(FixerTestCase):
-class Test_imports:
+class Test_imports(FixerTestCase):
fixer = "imports"
from ..fixes.fix_imports import MAPPING as modules