Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
be0e177a
Commit
be0e177a
authored
Jul 25, 2009
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
account for range() py3k change
parent
06b60410
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Doc/library/unittest.rst
Doc/library/unittest.rst
+2
-2
No files found.
Doc/library/unittest.rst
View file @
be0e177a
...
...
@@ -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)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment