add tests to increase coverage#731
Open
JohananOppongAmoateng wants to merge 2 commits intobeeware:mainfrom
Open
add tests to increase coverage#731JohananOppongAmoateng wants to merge 2 commits intobeeware:mainfrom
JohananOppongAmoateng wants to merge 2 commits intobeeware:mainfrom
Conversation
|
|
||
|
|
||
| def test_maker_functions(): | ||
| """Test maker functions (lines 888, 893, 903, 908, 913, 938)""" |
Member
There was a problem hiding this comment.
Two notes here:
- You don't refer to specific lines of code in coverage, because a one line unrelated change in the same file will make all the line references invalid. Refer to a specific feature that is being tested.
- In this test, you're testing 7 different maker methods. These should be 7 independent tests (or, at least, one test that has been parameterised with 7 items).
- We're not just looking to verify line coverage - we want to verify that the thing being tested works as advertised. An
isinstancecheck is one thing to verify - but verifying that the attributes of the created object have been set correctly is the other key detail.
|
|
||
|
|
||
| def test_compound_value_errors(): | ||
| """Test compound_value_for_sequence errors (lines 598, 620, 660)""" |
Member
There was a problem hiding this comment.
A test should verify exactly one behaviour. There are three behaviours being tested here; that means 3 tests.
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.
Add more tests to increase coverage. #729
PR Checklist: