diff options
Diffstat (limited to 'Doc/library/unittest.rst')
-rw-r--r-- | Doc/library/unittest.rst | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 955c794..283d2fd 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -172,13 +172,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) |