summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_collections.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2009-02-24 12:23:23 (GMT)
committerRaymond Hettinger <python@rcn.com>2009-02-24 12:23:23 (GMT)
commit8c56f8890eefdfd769d864aa901db5cf4586b4cd (patch)
tree2f3713fc41b5068d73338f73e1546d932ac94653 /Lib/test/test_collections.py
parentc9332fada6dbb8e811762d480bb54c38ed52bc3d (diff)
downloadcpython-8c56f8890eefdfd769d864aa901db5cf4586b4cd.zip
cpython-8c56f8890eefdfd769d864aa901db5cf4586b4cd.tar.gz
cpython-8c56f8890eefdfd769d864aa901db5cf4586b4cd.tar.bz2
Backport 69934: Register xrange() as a Sequence.
Diffstat (limited to 'Lib/test/test_collections.py')
-rw-r--r--Lib/test/test_collections.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 4901eae..9767aff 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -406,6 +406,9 @@ class TestCollectionABCs(ABCTestCase):
self.failUnless(isinstance(sample(), Sequence))
self.failUnless(issubclass(sample, Sequence))
self.failUnless(issubclass(basestring, Sequence))
+ self.failUnless(isinstance(range(10), Sequence))
+ self.failUnless(issubclass(xrange, Sequence))
+ self.failUnless(issubclass(str, Sequence))
self.validate_abstract_methods(Sequence, '__contains__', '__iter__', '__len__',
'__getitem__')