Skip to content
This repository was archived by the owner on Mar 2, 2022. It is now read-only.

Commit 0965343

Browse files
committed
Fork tests which have different output between 3.6 and 3.7
Summary: Due to code generation changes some of our tests now have different output between 3.6 and 3.7 - in particular due to the removal of the support for async __aiter__. This adds support for version specific tests and forks these appropriately There's also one test case which is overly specific that gets hit by LOAD_METHOD/CALL_METHOD - this just makes it a little more generic, we don't really care about this part of the code gen. Test Plan: ./python -m test_compiler
1 parent e046cdc commit 0965343

24 files changed

+350
-2
lines changed
File renamed without changes.

test_compiler/sbs_code_tests/58_async_for_continue.py renamed to test_compiler/sbs_code_tests/3.6/58_async_for_continue.py

File renamed without changes.

test_compiler/sbs_code_tests/58_async_for_dict_comp.py renamed to test_compiler/sbs_code_tests/3.6/58_async_for_dict_comp.py

File renamed without changes.
File renamed without changes.

test_compiler/sbs_code_tests/58_async_for_gen_comp.py renamed to test_compiler/sbs_code_tests/3.6/58_async_for_gen_comp.py

File renamed without changes.

test_compiler/sbs_code_tests/58_async_for_list_comp.py renamed to test_compiler/sbs_code_tests/3.6/58_async_for_list_comp.py

File renamed without changes.

test_compiler/sbs_code_tests/58_async_for_set_comp.py renamed to test_compiler/sbs_code_tests/3.6/58_async_for_set_comp.py

File renamed without changes.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
((yield from abc) for x in iter)
2+
# EXPECTED:
3+
[
4+
...,
5+
CODE_START('<genexpr>'),
6+
...,
7+
LOAD_GLOBAL('abc'),
8+
GET_YIELD_FROM_ITER(0),
9+
LOAD_CONST(None),
10+
YIELD_FROM(0),
11+
YIELD_VALUE(0),
12+
...
13+
]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
((yield 42) for i in gen())
2+
# EXPECTED:
3+
[
4+
...,
5+
LOAD_CONST(42),
6+
YIELD_VALUE(0),
7+
YIELD_VALUE(0),
8+
...
9+
]
File renamed without changes.

0 commit comments

Comments
 (0)