-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase pytest coverage by either adding tests or removing unused code #31
Commits on Sep 15, 2021
-
TestTspClient: Add complete{d} timegraph tree test
Base this new test on the existing test_fetch_xy. Rename the hereby reused REQUESTED_TIME constants accordingly; no longer XY-specific. Don't redundantly assert model_type; test_fetch_timegraph_tree does so already. Now, adding this test increases test coverage (cf. README) in these specific ways: - time_graph_model.py: from 25% to 33%; - entry_model.py: from 84% to 88%; - response.py: from 86% to 89%. <=> From 59% to 60% total. More work remains then to cover tsp/ further. Signed-off-by: Marco Miller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for a505f60 - Browse repository at this point
Copy the full SHA a505f60View commit details -
TestTspClient: Remove duplication just introduced
Remove the duplication introduced by test_fetch_timegraph_tree_complete, which was based on test_fetch_xy. Add the private __requested_parameters helper method for this. Signed-off-by: Marco Miller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for f76f462 - Browse repository at this point
Copy the full SHA f76f462View commit details -
Remove the unused DataType class w/ its whole file
Signed-off-by: Marco Miller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9ed278d - Browse repository at this point
Copy the full SHA 9ed278dView commit details -
Remove storing unspecified parameters in 'others'
If some data is needed to be transferred between server and clients over the TSP, then it needs to properly be specified in the TSP, so that clients and server can support it. Fixes #35 Signed-off-by: Marco Miller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5fcdbc3 - Browse repository at this point
Copy the full SHA 5fcdbc3View commit details -
EntryModel: Remove redundant local variable
Signed-off-by: Marco Miller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 9a62793 - Browse repository at this point
Copy the full SHA 9a62793View commit details -
Tree{Model,Item}: Move out of tsp/ package; cli's
Move tree_model.py's whole content (both classes) out of the tsp/ package, as only ./tsp-cli-client uses it. Make the file a sibling of the latter, as duly expected. This move also solves the issue of tsp/ pytest coverage previously reporting that file as not covered at all. Signed-off-by: Marco Miller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 3a73eb2 - Browse repository at this point
Copy the full SHA 3a73eb2View commit details -
Add pragma(s) where no pytest coverage necessary
The pytest(s) coverage and its reporting is not meant to cover all paths. Add no-cover pragma directives to uncovered paths that may be safely ignored by pytest reporting. Do so as the scope of these tests is mainly integration and main coverage of client paths towards the server. Ignore paths such as negative or corner (thus less likely) cases. Ignore paths also that are either TODO code or manual cli printouts and cases. The remaining uncovered lines are backlogged to be covered further, yet through larger efforts. README has the pytest command showing the report, which currently shows 80% coverage (round number a coincidence). Some no-cover pragmas might be removed as some more paths end up being covered, through potential pytest or code amends. Signed-off-by: Marco Miller <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for d298b91 - Browse repository at this point
Copy the full SHA d298b91View commit details