tests: branches coverage in test_authentication, test_background, test_responses, test_routing#2796
Merged
Kludex merged 4 commits intoKludex:masterfrom Dec 15, 2024
Merged
Conversation
… `test_responses`, `test_routing`
Kludex
approved these changes
Dec 14, 2024
Kludex
reviewed
Dec 14, 2024
Kludex
approved these changes
Dec 15, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 branchto all the cases, except fortest_authentication, where I changed the#pragma: no coverline 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
elifconditions or depends on a condition to pass the test.tests/test_authentication.pytests/test_background.pytests/test_responses.pytests/test_routing.pyThe 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