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

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: use PyMemberDef Created 5 months, 1 week ago , Downloaded from: http://bugs.python.org/file10155/range_lean_and_mean2.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 62626)
+++ 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)
+
def test_main():
test.test_support.run_unittest(RangeTest)
« no previous file | Objects/rangeobject.c » ('j')

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