forked from nedbat/byterun
-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add darius' test. Start to reorg test/examples...
So that it groups test examples like the tests runners do.
- Loading branch information
rocky
committed
May 4, 2020
1 parent
c59ce0a
commit e4782c0
Showing
23 changed files
with
45 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/.python-version |
15 changes: 15 additions & 0 deletions
15
test/examples/functions/test_closure_vars_from_static_parent.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Test provided by Darius | ||
# | ||
# https://github.com/nedbat/byterun/pull/20/commits/70727da1e5c6f98075b2eeecc597cb81b43e7c4f | ||
# for issue https://github.com/nedbat/byterun/issues/17 | ||
def f(xs): | ||
return lambda: xs[0] | ||
|
||
|
||
def g(h): | ||
xs = 5 | ||
lambda: xs | ||
return h() | ||
|
||
|
||
assert g(f([42])) == 42 |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters