[issue35080] The tests for the `dis` module can be too rigid when changing opcodes

2018-10-26 Thread Maxime Belanger
Maxime Belanger added the comment: Ah, quite right; apologies for the not-so-useful PR! -- resolution: -> wont fix stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue35080] The tests for the `dis` module can be too rigid when changing opcodes

2018-10-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually this change decreases flexibility of tests. Expected output is generated. See the comment above it. When you change the bytecode, you need just uncomment these lines, run tests, copy the output, and comment out them back. The output contains numer

[issue35080] The tests for the `dis` module can be too rigid when changing opcodes

2018-10-26 Thread Maxime Belanger
Change by Maxime Belanger : -- components: +Library (Lib), Tests ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue35080] The tests for the `dis` module can be too rigid when changing opcodes

2018-10-26 Thread Max Bélanger
Change by Max Bélanger : -- keywords: +patch pull_requests: +9469 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list

[issue35080] The tests for the `dis` module can be too rigid when changing opcodes

2018-10-26 Thread Maxime Belanger
New submission from Maxime Belanger : For various reasons, one may want to change the `Lib/opcode.py` module. In doing so, this has caused us to frequently rewrite `test_dis.py`. It would be great if those tests used `dis.opmap` rather than hard-coded/magic numbers, as this would allow easier