Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests: first pass at improving coverage (#47)
* First pass at improving test coverage. - added a .coveragerc config file; - changed a number of exceptions to classes ignored in the config file; - added and extended several tests; - various small improvements. - more Exceptions converted into AssertionErrors * Simplified code and changed more exceptions in pydecred/txscript.py . * Split test_pydecred.py into test_calc.py, text_txscript.py and test_vsp.py . * Replace all Unimplemented errors in wallet/api.py with NotImplementedError. * Substituted most plain assert checks with proper exceptions.
- Loading branch information
Showing
20 changed files
with
901 additions
and
799 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Test coverage tool configuration, see reference at | ||
# https://coverage.readthedocs.io/en/latest/config.html | ||
|
||
[run] | ||
omit = tinydecred/tests/* | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
nocover | ||
|
||
# Don't complain about debug-only code. | ||
def __repr__ | ||
|
||
# Don't complain if non-runnable code isn't run. | ||
if __name__ == .__main__.: | ||
|
||
# Don't complain if tests don't hit defensive assertion code. | ||
assert | ||
raise NotImplementedError | ||
raise CrazyKeyError | ||
raise ParameterRangeError | ||
|
||
ignore_errors = True | ||
# skip_covered = True | ||
skip_empty = True |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ __pycache__/ | |
*.sublime-project | ||
*.sublime-workspace | ||
examples/testnet | ||
.coverage |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.