Skip to content

Commit

Permalink
Merge pull request #144 from rocky/issue_138
Browse files Browse the repository at this point in the history
Issue 138
  • Loading branch information
rocky authored Aug 16, 2024
2 parents db4a5b0 + fbcae96 commit 6965f26
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions pytest/test_disasm.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def run_check_disasm(test_tuple, function_to_test):
("03_big_dict", "3.5", ["classic", "xasm"]),
("03_big_dict", "3.6", ["classic", "xasm"]),
("03_big_dict", "3.6", ["classic", "xasm"]),
("03_annotations", "3.7", ["classic", "xasm"]),
("test_nested_scopes", "2.1", ["extended-bytes"]),
# ("01_augmented_assign", "3.7", ["extended-bytes"]),
# ("03_big_dict", "3.10"), # FIXME
Expand Down
25 changes: 25 additions & 0 deletions pytest/testdata/03_annotations-3.7.right
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Source code size mod 2**32: 36 bytes
# Method Name: <module>
# Filename: 03_annotations.py
# Argument count: 0
# Keyword-only arguments: 0
# Number of locals: 0
# Stack size: 2
# Flags: 0x00100040 (FUTURE_ANNOTATIONS | NOFREE)
# First Line: 1
# Constants:
# 0: 0
# 1: ('annotations',)
# 2: None
# Names:
# 0: __future__
# 1: annotations
1: 0 LOAD_CONST (0)
2 LOAD_CONST (('annotations',))
4 IMPORT_NAME (__future__)
6 IMPORT_FROM (annotations)
8 STORE_NAME (annotations)
10 POP_TOP
12 LOAD_CONST (None)
14 RETURN_VALUE

27 changes: 27 additions & 0 deletions pytest/testdata/03_annotations-xasm-3.7.right
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Source code size mod 2**32: 36 bytes

# Method Name: <module>
# Filename: 03_annotations.py
# Argument count: 0
# Keyword-only arguments: 0
# Number of locals: 0
# Stack size: 2
# Flags: 0x00100040 (FUTURE_ANNOTATIONS | NOFREE)
# First Line: 1
# Constants:
# 0: 0
# 1: ('annotations',)
# 2: None
# Names:
# 0: __future__
# 1: annotations
1:
LOAD_CONST 0 (0)
LOAD_CONST 1 (('annotations',))
IMPORT_NAME 0 (__future__)
IMPORT_FROM 1 (annotations)
STORE_NAME 1 (annotations)
POP_TOP
LOAD_CONST 2 (None)
RETURN_VALUE

Binary file added test/bytecode_3.7/03_annotations.pyc
Binary file not shown.

0 comments on commit 6965f26

Please sign in to comment.