tests: branches coverage in test_authentication
, test_background
, test_responses
, test_routing
#2796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Related to issue #2452
This PR addresses the cases in the test files below and essentially adds
#pragma: no branch
to all the cases, except fortest_authentication
, where I changed the#pragma: no cover
line to cover the function that is not used.From what I can see, there are no branch options to be covered, as the code relies on
elif
conditions or depends on a condition to pass the test.tests/test_authentication.py
tests/test_background.py
tests/test_responses.py
tests/test_routing.py
The only one I don't fully understand is
test_routing
(line 874), where it's marking the @pytest.parametrized test as having uncovered branches.Checklist