module documentation

Tests for blocks.py. To create test cases, you can disassemble source code with the help of the dis module. For example, in Python 3.7, this snippet: import dis import opcode def f(): return None bytecode = dis.Bytecode(f) for x in bytecode.codeobj.co_code: print(f'{x} ({opcode.opname[x]})') prints: 100 (LOAD_CONST) 0 (<0>) 83 (RETURN_VALUE) 0 (<0>)

Class BaseBlocksTest A base class for implementing tests testing blocks.py.
Class BlockStackTest Test the add_pop_block_targets function.
Class OrderingTest Tests for order_code in blocks.py.