From a08a3c514d848146577458f87da8c343a8002ddc Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Thu, 13 Aug 2009 08:40:50 +0000 Subject: [PATCH] Merged revisions 74196 via svnmerge from svn+ssh://svn.python.org/python/branches/py3k ........ r74196 | benjamin.peterson | 2009-07-25 03:02:01 +0200 (Sa, 25 Jul 2009) | 1 line account for range() py3k change ........ --- Doc/library/unittest.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 61883f61158..32d095289e3 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -105,13 +105,13 @@ Here is a short script to test three functions from the :mod:`random` module:: 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)