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 ba93b06
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test_project/adam.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,9 @@ 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:
# Any object which isn't None passes the truth value testing so here
# we use `while object()` instead of `while True` b/c the later becomes
# `while False` when BooleanReplacer is applied and we don't trigger an
# infinite loop.
while object():
break

0 comments on commit ba93b06

Please sign in to comment.