Skip to content

Commit

Permalink
Add no cover else branch to _generate_key
Browse files Browse the repository at this point in the history
There doesn't seem to be a way to tell coverage to ignore the the case
when nothing matches in a if-elif group.
  • Loading branch information
VincentVanlaer committed Apr 16, 2023
1 parent 27604f4 commit 9d89683
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions trustme/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,8 @@ def _generate_key(self) -> CERTIFICATE_PRIVATE_KEY_TYPES:
)
elif self is KeyType.ECDSA:
return ec.generate_private_key(ec.SECP256R1())
else: # pragma: no cover
raise ValueError("Unknown key type")


class CA:
Expand Down

0 comments on commit 9d89683

Please sign in to comment.