Stylistic question regarding no-op code and tests
Ben Finney
ben+python at benfinney.id.au
Wed Oct 14 22:07:15 EDT 2015
Jason Swails <jason.swails at gmail.com> writes:
> What I recently realized, though, that what this construct allows is
> for the coverage testing package (which I have recently started
> employing for my project... thanks Ned and others!) to detect whether
> or not both code paths are covered in the test suite.
Coverage.py has, for many releases now, had good measurement of branch
coverage by your tests. Enable it with the ‘--branch’ option to ‘run’
<URL:https://coverage.readthedocs.org/en/latest/branch.html>.
--
\ “They who can give up essential liberty to obtain a little |
`\ temporary safety, deserve neither liberty nor safety.” |
_o__) —Benjamin Franklin, 1775-02-17 |
Ben Finney
More information about the Python-list
mailing list