Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06b6041 commit be0e177Copy full SHA for be0e177
1 file changed
Doc/library/unittest.rst
@@ -172,13 +172,13 @@ Here is a short script to test three functions from the :mod:`random` module::
172
class TestSequenceFunctions(unittest.TestCase):
173
174
def setUp(self):
175
- self.seq = range(10)
+ self.seq = list(range(10))
176
177
def test_shuffle(self):
178
# make sure the shuffled sequence does not lose any elements
179
random.shuffle(self.seq)
180
self.seq.sort()
181
- self.assertEqual(self.seq, range(10))
+ self.assertEqual(self.seq, list(range(10)))
182
183
def test_choice(self):
184
element = random.choice(self.seq)
0 commit comments