diff --git a/test/bytecode_3.7_run/05_control_flow_bugs.pyc b/test/bytecode_3.7_run/05_control_flow_bugs.pyc index cf33c659..a6e3d115 100644 Binary files a/test/bytecode_3.7_run/05_control_flow_bugs.pyc and b/test/bytecode_3.7_run/05_control_flow_bugs.pyc differ diff --git a/test/bytecode_3.8_run/05_control_flow_bugs.pyc-notyet b/test/bytecode_3.8_run/05_control_flow_bugs.pyc-notyet new file mode 100644 index 00000000..a850cf3e Binary files /dev/null and b/test/bytecode_3.8_run/05_control_flow_bugs.pyc-notyet differ diff --git a/test/simple_source/operation_logic/05_control_flow_bugs.py b/test/simple_source/operation_logic/05_control_flow_bugs.py index 0eb1a7ad..f756f2ad 100644 --- a/test/simple_source/operation_logic/05_control_flow_bugs.py +++ b/test/simple_source/operation_logic/05_control_flow_bugs.py @@ -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