-
-
Notifications
You must be signed in to change notification settings - Fork 154
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from rocky/go-over-add-test
Fix up add-test for 3.8pypy ..
- Loading branch information
Showing
9 changed files
with
172 additions
and
12 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
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 modified
BIN
+579 Bytes
(130%)
test/bytecode_3.8/code-fragment/list-comprehension/03_async.pyc
Binary file not shown.
Binary file added
BIN
+570 Bytes
test/bytecode_3.8pypy/code-fragment/generator/03_generator_compendium.pyc
Binary file not shown.
Binary file added
BIN
+343 Bytes
test/bytecode_3.8pypy/code-fragment/list-comprehension/01_basic_list_comprehension.pyc
Binary file not shown.
Binary file removed
BIN
-703 Bytes
test/bytecode_3.8pypy/code-fragment/list-comprehension/01_list_comprehensionpy38.pyc
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# 3.8 PyPy uses PyPy-specific BUILD_LIST_FROM_ARG | ||
# fmt: off | ||
[func for func | ||
in | ||
__file__] |
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,70 @@ | ||
# These are an accumulation of list comprehensions using "async" or "await. | ||
# They were culled from all list comprehensions on my disk under Python 3.8. | ||
|
||
# From Python 3.8 tqdm/asyncio.py | ||
# Note we need to add the "async def" for this list comprehension | ||
|
||
# fmt: off | ||
async def gather(cls, *fs, loop=None, timeout=None, total=None, **tqdm_kwargs): | ||
[await f | ||
for f in | ||
cls.as_completed( | ||
loop=loop, | ||
total=total, | ||
**tqdm_kwargs)] | ||
|
||
|
||
# From Python 3.8 test/test_asyncgen.py | ||
async def arange(n): | ||
[i | ||
async | ||
for i | ||
in range(10) | ||
] | ||
|
||
# From Python 3.8 test/test_coroutines.py | ||
|
||
def make_brange(n): | ||
return (i * 2 | ||
async | ||
for i | ||
in range(20)) | ||
|
||
# We were not parsing the "if" as one unit. | ||
async def run_list(): | ||
return [i | ||
async for i | ||
in range(5) | ||
if 0 < | ||
i < | ||
4] | ||
|
||
# Another "if" parsing problem | ||
async def run_list2(): | ||
return [i + 1 | ||
for pair in | ||
([10, 20], [30, 40]) | ||
if pair > 10 | ||
async | ||
for i in | ||
ord(pair) | ||
if i > 30] | ||
|
||
|
||
async def run_list3(): | ||
return [i | ||
async for i | ||
in range(5) | ||
if 0 < | ||
i < | ||
4] | ||
|
||
# Adapted from line 2071 of 3.8.12 lib/python3.8/test/test_coroutines.py | ||
# The bug was in the iterator tgt[0] which needs a | ||
# store_subscript rule. | ||
async def run_list4(tgt): | ||
return [0 | ||
async for | ||
tgt[0] in | ||
__file__ | ||
] |
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,70 @@ | ||
# These are an accumulation of list comprehensions using "async" or "await. | ||
# They were culled from all list comprehensions on my disk under Python 3.8. | ||
|
||
# From Python 3.8 tqdm/asyncio.py | ||
# Note we need to add the "async def" for this list comprehension | ||
|
||
# fmt: off | ||
async def gather(cls, *fs, loop=None, timeout=None, total=None, **tqdm_kwargs): | ||
[await f | ||
for f in | ||
cls.as_completed( | ||
loop=loop, | ||
total=total, | ||
**tqdm_kwargs)] | ||
|
||
|
||
# From Python 3.8 test/test_asyncgen.py | ||
async def arange(n): | ||
[i | ||
async | ||
for i | ||
in range(10) | ||
] | ||
|
||
# From Python 3.8 test/test_coroutines.py | ||
|
||
def make_brange(n): | ||
return (i * 2 | ||
async | ||
for i | ||
in range(20)) | ||
|
||
# We were not parsing the "if" as one unit. | ||
async def run_list(): | ||
return [i | ||
async for i | ||
in range(5) | ||
if 0 < | ||
i < | ||
4] | ||
|
||
# Another "if" parsing problem | ||
async def run_list2(): | ||
return [i + 1 | ||
for pair in | ||
([10, 20], [30, 40]) | ||
if pair > 10 | ||
async | ||
for i in | ||
ord(pair) | ||
if i > 30] | ||
|
||
|
||
async def run_list3(): | ||
return [i | ||
async for i | ||
in range(5) | ||
if 0 < | ||
i < | ||
4] | ||
|
||
# Adapted from line 2071 of 3.8.12 lib/python3.8/test/test_coroutines.py | ||
# The bug was in the iterator tgt[0] which needs a | ||
# store_subscript rule. | ||
async def run_list4(tgt): | ||
return [0 | ||
async for | ||
tgt[0] in | ||
__file__ | ||
] |