summaryrefslogtreecommitdiffstats
path: root/Doc/library/unittest.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-08-13 08:40:50 (GMT)
committerGeorg Brandl <georg@python.org>2009-08-13 08:40:50 (GMT)
commita08a3c514d848146577458f87da8c343a8002ddc (patch)
tree62f3af3e9e45af0290f07b03016cdd9b42c42dd0 /Doc/library/unittest.rst
parent4a3b309509f3e92aa6566fbf26c342ca058e56f4 (diff)
downloadcpython-a08a3c514d848146577458f87da8c343a8002ddc.zip
cpython-a08a3c514d848146577458f87da8c343a8002ddc.tar.gz
cpython-a08a3c514d848146577458f87da8c343a8002ddc.tar.bz2
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 ........
Diffstat (limited to 'Doc/library/unittest.rst')
-rw-r--r--Doc/library/unittest.rst4
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 61883f6..32d0952 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)