diff options
author | Walter Dörwald <walter@livinglogic.de> | 2007-05-20 08:22:37 (GMT) |
---|---|---|
committer | Walter Dörwald <walter@livinglogic.de> | 2007-05-20 08:22:37 (GMT) |
commit | 67d999305f221dc8c7db7bf8395fcd3aae786f4d (patch) | |
tree | 78720817a1a7abc7a9f1222a768a564cb92cd78e /Lib | |
parent | 850e516ebc29187a200fecd7e325ea000f42043f (diff) | |
download | cpython-67d999305f221dc8c7db7bf8395fcd3aae786f4d.zip cpython-67d999305f221dc8c7db7bf8395fcd3aae786f4d.tar.gz cpython-67d999305f221dc8c7db7bf8395fcd3aae786f4d.tar.bz2 |
Add a few simple repr tests.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_xrange.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_xrange.py b/Lib/test/test_xrange.py index 1e7f9de..a31f175 100644 --- a/Lib/test/test_xrange.py +++ b/Lib/test/test_xrange.py @@ -56,6 +56,11 @@ class XrangeTest(unittest.TestCase): 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) |