Skip to content

Commit

Permalink
Added pragmas for no coverage of exception results
Browse files Browse the repository at this point in the history
  • Loading branch information
vhaasteren committed Sep 26, 2023
1 parent 37b4c9c commit 1df974a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions enterprise/signals/white_signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import fastshermanmorrison.fastshermanmorrison as fastshermanmorrison

fsm_warning_issued = False
except ImportError:
except ImportError: #pragma: no cover
fastshermanmorrison = None
fsm_warning_issued = False

Expand Down Expand Up @@ -191,7 +191,7 @@ def EcorrKernelNoise(
msg = "EcorrKernelNoise does not support method: {}".format(method)
raise TypeError(msg)

if method == "fast-sherman-morrison" and fastshermanmorrison is None and not fsm_warning_issued:
if method == "fast-sherman-morrison" and fastshermanmorrison is None and not fsm_warning_issued: # pragma: no cover
msg = "Package `fastshermanmorrison` not installed. Fallback to sherman-morrison"
logger.warning(msg)
fsm_warning_issued = True
Expand Down Expand Up @@ -239,7 +239,7 @@ def get_ndiag(self, params):
elif method == "fast-sherman-morrison":
if fastshermanmorrison:
return self._get_ndiag_fast_sherman_morrison(params)
else:
else: # pragma: no cover
return self._get_ndiag_sherman_morrison(params)
elif method == "sparse":
return self._get_ndiag_sparse(params)
Expand Down

0 comments on commit 1df974a

Please sign in to comment.