mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
hybrid dis.py from CPython 3.13.10
This commit is contained in:
1 parent
d11604995a
commit
152d10bfea
4 files changed
+1054
-5
No files matched your search
Vendored
+1054
File diff suppressed because it is too large.
Load diff
Vendored
-2
@@ -27,7 +27,6 @@ class OpListTests(unittest.TestCase):
|
||||
self.check_bool_function_result(_opcode.has_local, invalid, False)
|
||||
self.check_bool_function_result(_opcode.has_exc, invalid, False)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'dis' has no attribute 'opmap'
|
||||
def test_is_valid(self):
|
||||
names = [
|
||||
'CACHE',
|
||||
@@ -39,7 +38,6 @@ class OpListTests(unittest.TestCase):
|
||||
opcodes = [dis.opmap[opname] for opname in names]
|
||||
self.check_bool_function_result(_opcode.is_valid, opcodes, True)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'dis' has no attribute 'hasarg'
|
||||
def test_oplists(self):
|
||||
def check_function(self, func, expected):
|
||||
for op in [-10, 520]:
|
||||
|
||||
Vendored
-2
@@ -1070,8 +1070,6 @@ if 1:
|
||||
elif instr.opname in HANDLED_JUMPS:
|
||||
self.assertNotEqual(instr.arg, (line + 1)*INSTR_SIZE)
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_no_wraparound_jump(self):
|
||||
# See https://bugs.python.org/issue46724
|
||||
|
||||
|
||||
Vendored
-1
@@ -1799,7 +1799,6 @@ print(f'''{{
|
||||
self.assertIn(rb'\1', stdout)
|
||||
self.assertEqual(len(stderr.strip().splitlines()), 2)
|
||||
|
||||
@unittest.expectedFailure # TODO: RUSTPYTHON; AttributeError: module 'dis' has no attribute 'get_instructions'
|
||||
def test_fstring_without_formatting_bytecode(self):
|
||||
# f-string without any formatting should emit the same bytecode
|
||||
# as a normal string. See gh-99606.
|
||||
|
||||
Reference in new issue
Block a user