diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2023-02-09 08:04:42 -0700 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-02-09 08:04:42 -0700 |
commit | 1c2e2be9fbba200330ec84062eecf6662cbd5ee0 (patch) | |
tree | ec89fd7857eacdcb57a189950eac8329f8422972 /coverage | |
parent | 712bd2ba1bbf9e9eb51393539378c80f8272fe3b (diff) | |
download | python-coveragepy-git-1c2e2be9fbba200330ec84062eecf6662cbd5ee0.tar.gz |
test: adapt to latest pylint
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/collector.py | 2 | ||||
-rw-r--r-- | coverage/control.py | 2 | ||||
-rw-r--r-- | coverage/parser.py | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/coverage/collector.py b/coverage/collector.py index 22471504..2f8c1752 100644 --- a/coverage/collector.py +++ b/coverage/collector.py @@ -356,7 +356,7 @@ class Collector: try: fn(frame, event, arg, lineno=lineno) except TypeError as ex: - raise Exception("fullcoverage must be run with the C trace function.") from ex + raise RuntimeError("fullcoverage must be run with the C trace function.") from ex # Install our installation tracer in threading, to jump-start other # threads. diff --git a/coverage/control.py b/coverage/control.py index 78e0c70e..730ba554 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -337,7 +337,7 @@ class Coverage(TConfigurable): # '[run] _crash' will raise an exception if the value is close by in # the call stack, for testing error handling. if self.config._crash and self.config._crash in short_stack(limit=4): - raise Exception(f"Crashing because called by {self.config._crash}") + raise RuntimeError(f"Crashing because called by {self.config._crash}") def _write_startup_debug(self) -> None: """Write out debug info at startup if needed.""" diff --git a/coverage/parser.py b/coverage/parser.py index b8ddb501..ae70b4f0 100644 --- a/coverage/parser.py +++ b/coverage/parser.py @@ -821,7 +821,7 @@ class AstArcAnalyzer: # statement), or it's something we overlooked. if env.TESTING: if node_name not in self.OK_TO_DEFAULT: - raise Exception(f"*** Unhandled: {node}") # pragma: only failure + raise RuntimeError(f"*** Unhandled: {node}") # pragma: only failure # Default for simple statements: one exit from this node. return {ArcStart(self.line_for_node(node))} |