Skip to content

Commit 01e16dd

Browse files
committed
mark test_dis failures
1 parent de3e489 commit 01e16dd

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

Lib/test/test_dis.py

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,6 +1290,7 @@ def test__try_compile_no_context_exc_on_error(self):
12901290
except Exception as e:
12911291
self.assertIsNone(e.__context__)
12921292

1293+
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: No END_ASYNC_FOR in disassembly of async for
12931294
def test_async_for_presentation(self):
12941295

12951296
async def afunc():
@@ -1474,6 +1475,10 @@ def get_disassembly(self, func, lasti=-1, wrapper=True, **kwargs):
14741475
dis.disassemble(func, lasti, file=output, **kwargs)
14751476
return output.getvalue()
14761477

1478+
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: No END_ASYNC_FOR in disassembly of async for
1479+
def test_async_for_presentation(self):
1480+
return super().test_async_for_presentation()
1481+
14771482

14781483
if dis.code_info.__doc__ is None:
14791484
code_info_consts = "0: None"
@@ -1998,12 +2003,10 @@ def test_instruction_str(self):
19982003
for instr in instrs:
19992004
str(instr)
20002005

2001-
@unittest.expectedFailure # TODO: RUSTPYTHON
20022006
def test_default_first_line(self):
20032007
actual = dis.get_instructions(simple)
20042008
self.assertInstructionsEqual(list(actual), expected_opinfo_simple)
20052009

2006-
@unittest.expectedFailure # TODO: RUSTPYTHON
20072010
def test_first_line_set_to_None(self):
20082011
actual = dis.get_instructions(simple, first_line=None)
20092012
self.assertInstructionsEqual(list(actual), expected_opinfo_simple)
@@ -2340,7 +2343,6 @@ def test_explicit_first_line(self):
23402343
actual = dis.Bytecode(outer, first_line=expected_outer_line)
23412344
self.assertInstructionsEqual(list(actual), expected_opinfo_outer)
23422345

2343-
@unittest.expectedFailure # TODO: RUSTPYTHON
23442346
def test_source_line_in_disassembly(self):
23452347
# Use the line in the source code
23462348
actual = dis.Bytecode(simple).dis()
@@ -2385,28 +2387,24 @@ def test_bytecode_co_positions(self):
23852387
assert instr.positions == positions
23862388

23872389
class TestBytecodeTestCase(BytecodeTestCase):
2388-
@unittest.expectedFailure # TODO: RUSTPYTHON; RETURN_VALUE
23892390
def test_assert_not_in_with_op_not_in_bytecode(self):
23902391
code = compile("a = 1", "<string>", "exec")
23912392
self.assertInBytecode(code, "LOAD_SMALL_INT", 1)
23922393
self.assertNotInBytecode(code, "LOAD_NAME")
23932394
self.assertNotInBytecode(code, "LOAD_NAME", "a")
23942395

2395-
@unittest.expectedFailure # TODO: RUSTPYTHON; RETURN_VALUE
23962396
def test_assert_not_in_with_arg_not_in_bytecode(self):
23972397
code = compile("a = 1", "<string>", "exec")
23982398
self.assertInBytecode(code, "LOAD_SMALL_INT")
23992399
self.assertInBytecode(code, "LOAD_SMALL_INT", 1)
24002400
self.assertNotInBytecode(code, "LOAD_CONST", 2)
24012401

2402-
@unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: AssertionError not raised
24032402
def test_assert_not_in_with_arg_in_bytecode(self):
24042403
code = compile("a = 1", "<string>", "exec")
24052404
with self.assertRaises(AssertionError):
24062405
self.assertNotInBytecode(code, "LOAD_SMALL_INT", 1)
24072406

24082407
class TestFinderMethods(unittest.TestCase):
2409-
@unittest.expectedFailure # TODO: RUSTPYTHON
24102408
def test__find_imports(self):
24112409
cases = [
24122410
("import a.b.c", ('a.b.c', 0, None)),
@@ -2611,7 +2609,6 @@ def test_show_cache(self):
26112609
for flag in ['-C', '--show-caches']:
26122610
self.check_output(source, expect, flag)
26132611

2614-
@unittest.expectedFailure # TODO: RUSTPYTHON
26152612
def test_show_offsets(self):
26162613
# test 'python -m dis -O/--show-offsets'
26172614
source = 'pass'

0 commit comments

Comments
 (0)