Multiline asserts need too many pragma: no covers (original) (raw)
Originally reported by Barry Warsaw (Bitbucket: warsaw, GitHub: warsaw)
Code like the following:
#!python
assert command_class.name not in config.commands, ( # pragma: no cover
'Duplicate email command "{}" found in {}'.format( # pragma: no cover
command_class.name, # pragma: no cover
command_class.__module__))
Note the pragma: no cover
on every line. I want to completely ignore the entire assert statement, but w/o all those pragmas, I get a report that some of those lines aren't covered, which is true, but unhelpful!