summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)