test_dis should test the dis module, not everything else #90916
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee = None closed_at = None created_at = <Date 2022-02-15.14:17:08.858> labels = ['type-feature', 'tests'] title = 'test_dis should test the dis module, not everything else' updated_at = <Date 2022-02-18.21:38:39.147> user = 'https://github.com/markshannon'
activity = <Date 2022-02-18.21:38:39.147> actor = 'terry.reedy' assignee = 'none' closed = False closed_date = None closer = None components = ['Tests'] creation = <Date 2022-02-15.14:17:08.858> creator = 'Mark.Shannon' dependencies =  files =  hgrepos =  issue_num = 46760 keywords = ['patch'] message_count = 2.0 messages = ['413291', '413514'] nosy_count = 5.0 nosy_names = ['terry.reedy', 'Mark.Shannon', 'JelleZijlstra', 'brandtbucher', 'iritkatriel'] pr_nums = ['31369'] priority = 'normal' resolution = None stage = 'patch review' status = 'open' superseder = None type = 'enhancement' url = 'https://bugs.python.org/issue46760' versions = 
The text was updated successfully, but these errors were encountered:
This is getting really annoying.
Tiny changes in the calling sequence, or reordering CFGs, cause huge diffs in the test_dis module.
I've put this under "enhancement" as there is no "wastes a huge amount of time" category.
The test_dis should not:
This is not a new problem, but it does seem to be getting progressively worse.
A lot of the irritation stems from
With IDLE, I have issues with trying to test IDLE code without retesting tkinter, as well as deciding on the proper units of behavior to test.
expected_opinfo_outer = [ Instruction(opname='LOAD_CONST', opcode=100, arg=1, argval=3, argrepr='3', offset=0, starts_line=2, is_jump_target=False), Instruction(opname='LOAD_CONST', opcode=100, arg=2, argval=4, argrepr='4', offset=3, starts_line=None, is_jump_target=False), ... ]
expected_opinfo_outer = [Instruction(opname, opcode, arg, argval, argrepr, offset, starts_line, is_jumps_target) for opname, opcode, arg, argval, argrepr, offset, starts_line, is_jumps_target in (('LOAD_CONST', 100, 1, 3, '3', 0, 2, False), ('LOAD_CONST', 100, 2, 4, '4', 3, None, False), ... )]
…test_dis * Use a table with aligned elements rather than a list of `Instruction(key=value, ...)` constructors * Don't specify `positions=None` since it never changes. * Shorten overly-long string literals in test code. * Fix the one test that depends on its own line number.