Skip to content

Commit

Permalink
Ignores coverage data in the error cases
Browse files Browse the repository at this point in the history
  • Loading branch information
stumpylog committed Sep 8, 2023
1 parent 2b8bf00 commit b24e839
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/documents/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def util_call_with_backoff(
result = method_or_callable(*args)

succeeded = True
except ParseError as e:
except ParseError as e: # pragma: no cover
cause_exec = e.__cause__
if cause_exec is not None and isinstance(cause_exec, httpx.HTTPStatusError):
status_codes.append(cause_exec.response.status_code)
Expand All @@ -128,7 +128,7 @@ def util_call_with_backoff(
)
else:
warnings.warn(f"Unexpected error: {e}")
except Exception as e:
except Exception as e: # pragma: no cover
warnings.warn(f"Unexpected error: {e}")

retry_count = retry_count + 1
Expand All @@ -142,7 +142,7 @@ def util_call_with_backoff(
and skip_on_50x_err
and all(httpx.codes.is_server_error(code) for code in status_codes)
):
pytest.skip("Repeated HTTP 50x for service")
pytest.skip("Repeated HTTP 50x for service") # pragma: no cover

return succeeded, result

Expand Down

0 comments on commit b24e839

Please sign in to comment.