From 734786c719548354c130bd04f572d3fa4a724517 Mon Sep 17 00:00:00 2001 From: derekpierre Date: Fri, 1 Mar 2024 13:05:51 -0500 Subject: [PATCH] Additional tests around timeout value (default and explicit), and name. --- tests/test_strategy.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/test_strategy.py b/tests/test_strategy.py index f97f003..1966314 100644 --- a/tests/test_strategy.py +++ b/tests/test_strategy.py @@ -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):