Skip to content

Commit

Permalink
Clean up while loop in conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sammiee5311 authored and kclowes committed Apr 23, 2021
1 parent cdd13df commit 32cc2c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 1 addition & 3 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ def _wait_for_block(web3, block_number=1, timeout=None):
timeout = (block_number - web3.eth.block_number) * 3
poll_delay_counter = PollDelayCounter()
with Timeout(timeout) as timeout:
while True:
if web3.eth.block_number >= block_number:
break
while web3.eth.block_number < block_number:
web3.manager.request_blocking("evm_mine", [])
timeout.sleep(poll_delay_counter())
return _wait_for_block
Expand Down
1 change: 1 addition & 0 deletions newsfragments/1945.misc.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Clean up while statement in conftest.py

0 comments on commit 32cc2c6

Please sign in to comment.