You've already forked python-uncompyle6
mirror of
https://github.com/rocky/python-uncompyle6.git
synced 2025-08-03 00:45:53 +08:00
27 lines
455 B
Python
27 lines
455 B
Python
# Self-checking test.
|
|
# Mixed boolean expresions
|
|
|
|
b = True
|
|
assert b, 'b = True'
|
|
c = False
|
|
assert not c, 'c = False'
|
|
d = True
|
|
a = b and c or d
|
|
assert a, 'b and c or d'
|
|
a = (b or c) and d
|
|
assert a, '(b or c) and d'
|
|
a = b or c or d
|
|
assert a, 'b or c or d'
|
|
a = b and c and d
|
|
assert not a, 'b and c and d'
|
|
a = b or c and d
|
|
assert a
|
|
a = b and (c or d)
|
|
assert a
|
|
a = b and c or d
|
|
assert a
|
|
a = (b or c and d) and b
|
|
assert a
|
|
a = (b or c and d or a) and b
|
|
assert a
|