2 Feb
2021
2 Feb
'21
10:07 a.m.
The problem is not that dis.get_instructions can't be trusted, but that the test isn't testing the dis module at all. It is testing whether the output from the compiler has changed. A lot of the tests in test_dis do that.
Thanks. Perhaps such tests belong in a different test_* module? (I ask this in a rhetorical sense.) I realize that there can not be (nor should be) perfect isolation of test cases so that (for example) test_sys.py includes all tests of sys module functionality. Still, if a fairly large chunk of the contents of test_dis.py don't test dis module functionality (I'm guessing >= 50%), perhaps moving them to test_compiler.py or something similar would be a stronger signal about their intent. Skip