GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Update test_peepholer test_compiler_codegen test_compiler_assemble from 3.14.2 by ShaharNaveh · Pull Request #6870 · RustPython/RustPython

Update test_peepholer test_compiler_codegen test_compiler_assemble from 3.14.2 #6870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Sign up for GitHub

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
youknowone merged 2 commits into RustPython:main from ShaharNaveh:update-dis-3-14-2
Jan 27, 2026

Uh oh!

There was an error while loading. Please reload this page.

Merged

Update test_peepholer test_compiler_codegen test_compiler_assemble from 3.14.2 #6870

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit Hold shift + click to select a range
7cc4f43
Update `test_peepholer` from 3.14.2
ShaharNaveh Jan 25, 2026
253414f
Update `test_compiler_codegen` and `test_compiler_assemble`
ShaharNaveh Jan 25, 2026
File filter
Filter by extension

Clear filters
Conversations
Failed to load comments.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Jump to
Jump to file
Failed to load files.
Loading

Uh oh!

There was an error while loading. Please reload this page.

Diff view
Diff view
Prev Previous commit
Update test_compiler_codegen and test_compiler_assemble
  • Loading branch information

Uh oh!

There was an error while loading. Please reload this page.

@ShaharNaveh @youknowone
ShaharNaveh authored and youknowone committed Jan 27, 2026
commit 253414f168f835327aedc45f2c0eede4752aab74

There are no files selected for viewing

14 changes: 8 additions & 6 deletions 14 Lib/test/test_compiler_assemble.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def inner():
return x
return inner() % 2

inner_code = mod_two.__code__.co_consts[1]
inner_code = mod_two.__code__.co_consts[0]
assert isinstance(inner_code, types.CodeType)

metadata = {
Expand Down Expand Up @@ -125,13 +125,15 @@ def test_exception_table(self):
# code for "try: pass\n except: pass"
insts = [
('RESUME', 0),
('SETUP_FINALLY', 3),
('RETURN_CONST', 0),
('SETUP_CLEANUP', 8),
('SETUP_FINALLY', 4),
('LOAD_CONST', 0),
('RETURN_VALUE', None),
('SETUP_CLEANUP', 10),
('PUSH_EXC_INFO', None),
('POP_TOP', None),
('POP_EXCEPT', None),
('RETURN_CONST', 0),
('LOAD_CONST', 0),
('RETURN_VALUE', None),
('COPY', 3),
('POP_EXCEPT', None),
('RERAISE', 1),
Expand All @@ -144,4 +146,4 @@ def test_exception_table(self):
L1 to L2 -> L2 [0]
L2 to L3 -> L3 [1] lasti
""")
self.assertTrue(output.getvalue().endswith(exc_table))
self.assertEndsWith(output.getvalue(), exc_table)
20 changes: 12 additions & 8 deletions 20 Lib/test/test_compiler_codegen.py
Show comments
View file
Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,17 @@ def test_if_expression(self):
false_lbl = self.Label()
expected = [
('RESUME', 0, 0),
('ANNOTATIONS_PLACEHOLDER', None),
('LOAD_CONST', 0, 1),
('TO_BOOL', 0, 1),
('POP_JUMP_IF_FALSE', false_lbl := self.Label(), 1),
('LOAD_CONST', 1, 1),
('LOAD_CONST', 1, 1), # 42
('JUMP_NO_INTERRUPT', exit_lbl := self.Label()),
false_lbl,
('LOAD_CONST', 2, 1),
('LOAD_CONST', 2, 1), # 24
exit_lbl,
('POP_TOP', None),
('LOAD_CONST', 3),
('LOAD_CONST', 1),
('RETURN_VALUE', None),
]
self.codegen_test(snippet, expected)
Expand All @@ -45,6 +46,7 @@ def test_for_loop(self):
false_lbl = self.Label()
expected = [
('RESUME', 0, 0),
('ANNOTATIONS_PLACEHOLDER', None),
('LOAD_NAME', 0, 1),
('GET_ITER', None, 1),
loop_lbl := self.Label(),
Expand All @@ -59,7 +61,7 @@ def test_for_loop(self):
('JUMP', loop_lbl),
exit_lbl,
('END_FOR', None),
('POP_TOP', None),
('POP_ITER', None),
('LOAD_CONST', 0),
('RETURN_VALUE', None),
]
Expand All @@ -73,6 +75,7 @@ def f(x):
expected = [
# Function definition
('RESUME', 0),
('ANNOTATIONS_PLACEHOLDER', None),
('LOAD_CONST', 0),
('MAKE_FUNCTION', None),
('STORE_NAME', 0),
Expand All @@ -82,7 +85,7 @@ def f(x):
# Function body
('RESUME', 0),
('LOAD_FAST', 0),
('LOAD_CONST', 1),
('LOAD_CONST', 42),
('BINARY_OP', 0),
('RETURN_VALUE', None),
('LOAD_CONST', 0),
Expand All @@ -106,6 +109,7 @@ def g():
expected = [
# Function definition
('RESUME', 0),
('ANNOTATIONS_PLACEHOLDER', None),
('LOAD_CONST', 0),
('MAKE_FUNCTION', None),
('STORE_NAME', 0),
Expand All @@ -125,9 +129,9 @@ def g():
[
('RESUME', 0),
('NOP', None),
('LOAD_CONST', 1),
('LOAD_CONST', 12),
('RETURN_VALUE', None),
('LOAD_CONST', 0),
('LOAD_CONST', 1),
('RETURN_VALUE', None),
],
[
Expand All @@ -141,7 +145,7 @@ def g():
('LOAD_CONST', 4),
('STORE_FAST', 3),
('NOP', None),
('LOAD_CONST', 5),
('LOAD_CONST', 42),
('RETURN_VALUE', None),
('LOAD_CONST', 0),
('RETURN_VALUE', None),
Expand Down
Loading
Oops, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.