[Python-3000-checkins] r55464 - python/branches/py3k-struni/Lib/test/test_xrange.py

walter.doerwald python-3000-checkins at python.org
Sun May 20 10:22:40 CEST 2007


Author: walter.doerwald
Date: Sun May 20 10:22:37 2007
New Revision: 55464

Modified:
   python/branches/py3k-struni/Lib/test/test_xrange.py
Log:
Add a few simple repr tests.


Modified: python/branches/py3k-struni/Lib/test/test_xrange.py
==============================================================================
--- python/branches/py3k-struni/Lib/test/test_xrange.py	(original)
+++ python/branches/py3k-struni/Lib/test/test_xrange.py	Sun May 20 10:22:37 2007
@@ -56,6 +56,11 @@
         r = range(-sys.maxint, sys.maxint, 2)
         self.assertEqual(len(r), sys.maxint)
 
+    def test_repr(self):
+        self.assertEqual(repr(range(1)), 'range(1)')
+        self.assertEqual(repr(range(1, 2)), 'range(1, 2)')
+        self.assertEqual(repr(range(1, 2, 3)), 'range(1, 2, 3)')
+
 def test_main():
     test.test_support.run_unittest(XrangeTest)
 


More information about the Python-3000-checkins mailing list