mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-109485: Further improve test_future_stmt
tests (#109486)
Add assertSyntaxError() which run tests with an additional docstring and without docstring, and checks for the error message.
This commit is contained in:
parent
59f32a785f
commit
94c95d42a3
11 changed files with 106 additions and 115 deletions
10
Lib/test/test_future_stmt/nested_scope.py
Normal file
10
Lib/test/test_future_stmt/nested_scope.py
Normal file
|
@ -0,0 +1,10 @@
|
|||
"""This is a test"""
|
||||
|
||||
from __future__ import nested_scopes; import site
|
||||
|
||||
def f(x):
|
||||
def g(y):
|
||||
return x + y
|
||||
return g
|
||||
|
||||
result = f(2)(4)
|
Loading…
Add table
Add a link
Reference in a new issue