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

Unified Diff: Lib/test/test_range.py

Issue 602: range: lean and mean (Closed) SVN Base: http://svn.python.org/view/*checkout*/python/branches/py3k/
Patch Set: Created 4 months, 1 week ago , Downloaded from: http://bugs.python.org/file10152/range_lean_and_mean.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
« no previous file | Objects/rangeobject.c » ('j') | Expand Comments ('e') | Collapse Comments ('c') | Hide Comments ('s')
Index: Lib/test/test_range.py
===================================================================
--- Lib/test/test_range.py (revision 62616)
+++ Lib/test/test_range.py (working copy)
@@ -61,6 +61,16 @@
self.assertEqual(repr(range(1, 2)), 'range(1, 2)')
self.assertEqual(repr(range(1, 2, 3)), 'range(1, 2, 3)')
+ def test_attributes(self):
+ r = range(0, 10, 2)
+ self.assertEqual(r.start, 0)
+ self.assertEqual(r.stop, 10)
+ self.assertEqual(r.step, 2)
+ r = range(10)
+ self.assertEqual(r.start, 0)
+ self.assertEqual(r.stop, 10)
+ self.assertEqual(r.step, 1)
GvR 2008/05/02 13:52:47 I'd like the test to be explicit about what happen
+
def test_main():
test.test_support.run_unittest(RangeTest)
« no previous file | Objects/rangeobject.c » ('j')

Powered by Google App Engine
This is Rietveld r305