Skip to content

Commit

Permalink
Additional tests around timeout value (default and explicit), and name.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Mar 1, 2024
1 parent dc44376 commit 734786c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_strategy.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,16 @@

def test_timeout_strategy(w3, mocker):
TIMEOUT = 600 # 10 mins

# default timeout
timeout_strategy = TimeoutStrategy(w3)
assert timeout_strategy.timeout == TimeoutStrategy._TIMEOUT

# specific timeout
timeout_strategy = TimeoutStrategy(w3, timeout=TIMEOUT)
assert timeout_strategy.timeout == TIMEOUT

assert timeout_strategy.name == timeout_strategy._NAME

# None tx does not time out
with pytest.raises(RuntimeError):
Expand Down

0 comments on commit 734786c

Please sign in to comment.