summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/tests
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-11-16 07:16:24 (GMT)
committerGitHub <noreply@github.com>2017-11-16 07:16:24 (GMT)
commit0a2abdfca2495291809855cf7dfc6721c9c962e3 (patch)
tree7eabd56d628252e631bc5f44dc9e4e78bd764945 /Lib/lib2to3/tests
parenta7368ac6360246b1ef7f8f152963c2362d272183 (diff)
downloadcpython-0a2abdfca2495291809855cf7dfc6721c9c962e3.zip
cpython-0a2abdfca2495291809855cf7dfc6721c9c962e3.tar.gz
cpython-0a2abdfca2495291809855cf7dfc6721c9c962e3.tar.bz2
bpo-30143: 2to3 now generates a code that uses abstract collection classes (#1262)
from collections.abc rather than collections.
Diffstat (limited to 'Lib/lib2to3/tests')
-rw-r--r--Lib/lib2to3/tests/test_fixers.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/lib2to3/tests/test_fixers.py b/Lib/lib2to3/tests/test_fixers.py
index 3e1a255..e50b7da 100644
--- a/Lib/lib2to3/tests/test_fixers.py
+++ b/Lib/lib2to3/tests/test_fixers.py
@@ -4427,12 +4427,12 @@ class Test_operator(FixerTestCase):
def test_operator_isSequenceType(self):
b = "operator.isSequenceType(x)"
- a = "import collections\nisinstance(x, collections.Sequence)"
+ a = "import collections.abc\nisinstance(x, collections.abc.Sequence)"
self.check(b, a)
def test_operator_isMappingType(self):
b = "operator.isMappingType(x)"
- a = "import collections\nisinstance(x, collections.Mapping)"
+ a = "import collections.abc\nisinstance(x, collections.abc.Mapping)"
self.check(b, a)
def test_operator_isNumberType(self):
@@ -4478,12 +4478,12 @@ class Test_operator(FixerTestCase):
def test_bare_operator_isSequenceType(self):
s = "isSequenceType(z)"
- t = "You should use 'isinstance(z, collections.Sequence)' here."
+ t = "You should use 'isinstance(z, collections.abc.Sequence)' here."
self.warns_unchanged(s, t)
def test_bare_operator_isMappingType(self):
s = "isMappingType(x)"
- t = "You should use 'isinstance(x, collections.Mapping)' here."
+ t = "You should use 'isinstance(x, collections.abc.Mapping)' here."
self.warns_unchanged(s, t)
def test_bare_operator_isNumberType(self):