Skip to content

Commit

Permalink
Add additional failure condition when preview is reloading
Browse files Browse the repository at this point in the history
  • Loading branch information
Siecje committed Feb 3, 2024
1 parent 232e818 commit de0e6a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_preview.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def test_preview_reload_css(run_start: CliRunner) -> None: # noqa: ARG001
while after == before:
try:
response = requests.get(url, timeout=0.1)
except requests.exceptions.ReadTimeout:
except (requests.exceptions.ReadTimeout, requests.exceptions.ConnectionError):
# happens during restart
read_timeout = True
else:
Expand Down Expand Up @@ -182,7 +182,7 @@ def test_preview_reload_js(run_start: CliRunner) -> None: # noqa: ARG001
while after == before:
try:
response = requests.get(url, timeout=0.1)
except requests.exceptions.ReadTimeout:
except (requests.exceptions.ReadTimeout, requests.exceptions.ConnectionError):
# happens during restart
read_timeout = True
else:
Expand Down

0 comments on commit de0e6a9

Please sign in to comment.