[Python-checkins] r74196 - python/branches/py3k/Doc/library/unittest.rst

benjamin.peterson python-checkins at python.org
Sat Jul 25 03:02:02 CEST 2009


Author: benjamin.peterson
Date: Sat Jul 25 03:02:01 2009
New Revision: 74196

Log:
account for range() py3k change

Modified:
   python/branches/py3k/Doc/library/unittest.rst

Modified: python/branches/py3k/Doc/library/unittest.rst
==============================================================================
--- python/branches/py3k/Doc/library/unittest.rst	(original)
+++ python/branches/py3k/Doc/library/unittest.rst	Sat Jul 25 03:02:01 2009
@@ -172,13 +172,13 @@
    class TestSequenceFunctions(unittest.TestCase):
 
        def setUp(self):
-           self.seq = range(10)
+           self.seq = list(range(10))
 
        def test_shuffle(self):
            # make sure the shuffled sequence does not lose any elements
            random.shuffle(self.seq)
            self.seq.sort()
-           self.assertEqual(self.seq, range(10))
+           self.assertEqual(self.seq, list(range(10)))
 
        def test_choice(self):
            element = random.choice(self.seq)


More information about the Python-checkins mailing list