Skip to content

Commit

Permalink
Add result
Browse files Browse the repository at this point in the history
  • Loading branch information
zmoon committed Jan 29, 2024
1 parent 78c085a commit 2158e60
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ def func():
if n < 2:
n += 1
raise ConnectionError
return "result"

with caplog.at_level("INFO"):
func()
res = func()

for r in caplog.records:
assert r.getMessage() == "Retrying func in 1 s after connection error"

assert res == "result"

0 comments on commit 2158e60

Please sign in to comment.