Skip to content

Commit

Permalink
Modify the infinite loop function
Browse files Browse the repository at this point in the history
Don't use `while True` b/c BooleanReplacer breaks this function's
test. This is a bit ugly but until Issue sixty-north#97 is fixed there is
no other way around it.
  • Loading branch information
atodorov committed Jul 13, 2016
1 parent 7e31c59 commit 464c66b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion test_project/adam.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,8 @@ def use_continue(limit):
def trigger_infinite_loop():
# When `break` becomes `continue`, this should enter an infinite loop. This
# helps us test timeouts.
while True:
# we use `while len([1])` instead of `while True` b/c the later becomes
# `while False` when BooleanReplacer is applied and we don't trigger an
# infinite loop
while len([1]):
break

0 comments on commit 464c66b

Please sign in to comment.