You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-02 16:44:46 +08:00
More control-flow testing based on past failures...
Some of these still cause problems. Sigh.
This commit is contained in:
Binary file not shown.
BIN
test/bytecode_3.8_run/05_control_flow_bugs.pyc-notyet
Normal file
BIN
test/bytecode_3.8_run/05_control_flow_bugs.pyc-notyet
Normal file
Binary file not shown.
@@ -57,3 +57,20 @@ assert test_frozen(1, 1) == 4.0
|
||||
assert test_frozen(0, 1) == 5.0
|
||||
assert test_frozen(0.5, 0) == 6.0
|
||||
assert test_frozen(0, 0.5) == 8.0
|
||||
|
||||
# From 3.6.10 test_binop.py
|
||||
# Bug was getting "other += 3" outside of "if"/"else.
|
||||
def __floordiv__(a, b):
|
||||
other = 0
|
||||
if a:
|
||||
other = 1
|
||||
else:
|
||||
if not b:
|
||||
return 2
|
||||
other += 3
|
||||
return other
|
||||
|
||||
assert __floordiv__(True, True) == 4
|
||||
assert __floordiv__(True, False) == 4
|
||||
assert __floordiv__(False, True) == 3
|
||||
assert __floordiv__(False, False) == 2
|
||||
|
Reference in New Issue
Block a user