Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(6)

Unified Diff: Lib/test/test_operator.py

Issue 602: range: lean and mean (Closed) SVN Base: http://svn.python.org/view/*checkout*/python/branches/py3k/
Patch Set: address more concerns Created 1 year, 6 months ago , Downloaded from: http://bugs.python.org/file10183/range_lean_and_mean5.patch
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: Lib/test/test_operator.py
===================================================================
--- Lib/test/test_operator.py (revision 62662)
+++ Lib/test/test_operator.py (working copy)
@@ -148,7 +148,7 @@
self.failUnless(operator.truediv(5, 2) == 2.5)
def test_getitem(self):
- a = range(10)
+ a = list(range(10))
self.failUnlessRaises(TypeError, operator.getitem)
self.failUnlessRaises(TypeError, operator.getitem, a, None)
self.failUnless(operator.getitem(a, 2) == 2)
@@ -183,7 +183,7 @@
self.failUnlessRaises(TypeError, operator.isSequenceType)
self.failUnless(operator.isSequenceType(dir()))
self.failUnless(operator.isSequenceType(()))
- self.failUnless(operator.isSequenceType(range(10)))
+ self.failUnless(operator.isSequenceType(list(range(10))))
self.failUnless(operator.isSequenceType('yeahbuddy'))
self.failIf(operator.isSequenceType(3))
class Dict(dict): pass

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r483