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
ac19081c
Commit
ac19081c
authored
Feb 01, 2019
by
Emily Morehouse
Committed by
GitHub
Feb 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-35877: Add test for while loop named expression without parentheses (GH-11726)
parent
d4fceaaf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
Lib/test/test_named_expressions.py
Lib/test/test_named_expressions.py
+7
-1
No files found.
Lib/test/test_named_expressions.py
View file @
ac19081c
...
...
@@ -195,7 +195,7 @@ class NamedExpressionAssignmentTest(unittest.TestCase):
Where all variables are positive integers, and a is at least as large
as the n'th root of x, this algorithm returns the floor of the n'th
root of x (and roughly doubling the number of accurate bits per
iteration):
:
iteration):
"""
a
=
9
n
=
2
...
...
@@ -206,6 +206,12 @@ class NamedExpressionAssignmentTest(unittest.TestCase):
self
.
assertEqual
(
a
,
1
)
def
test_named_expression_assignment_15
(
self
):
while
a
:
=
False
:
pass
# This will not run
self
.
assertEqual
(
a
,
False
)
class
NamedExpressionScopeTest
(
unittest
.
TestCase
):
...
...
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