Files
python-uncompyle6/test/simple_source/bug27+/03_not_dead_code.py
rocky f4b7e54313 Refine 2.7 dead code test ..
in a hacky way. Will probalby have to expand this in the future or
better do dead code analysis
2018-02-19 07:06:04 -05:00

10 lines
442 B
Python

# Bug found in 2.7 test_itertools.py
# Bug was erroneously using reduction to unconditional_true
# A proper fix would be to use unconditional_true only when we
# can determine there is or was dead code.
from itertools import izip_longest
for args in [['abc', range(6)]]:
target = [tuple([arg[i] if i < len(arg) else None for arg in args])
for i in range(max(map(len, args)))]
assert list(izip_longest(*args)) == target