Skip to content

Commit

Permalink
Don't enforce coverage for untestable line
Browse files Browse the repository at this point in the history
To test this you would need to import an unused class
into the module so that it's in `globals()`, and have
the test know what class that is. Seems messy to me,
and not worth what it would be testing.
  • Loading branch information
Victor Zhou committed Aug 29, 2019
1 parent e5e0b3c commit 869033d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detect_secrets/plugins/common/initialize.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ def from_plugin_classname(
klass = globals()[plugin_classname]

# Make sure the instance is a BasePlugin type, before creating it.
if not issubclass(klass, BasePlugin):
if not issubclass(klass, BasePlugin): # pragma: no cover
raise TypeError

try:
Expand Down

0 comments on commit 869033d

Please sign in to comment.