From 67d999305f221dc8c7db7bf8395fcd3aae786f4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Walter=20D=C3=B6rwald?= Date: Sun, 20 May 2007 08:22:37 +0000 Subject: Add a few simple repr tests. --- Lib/test/test_xrange.py | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v0.12