summaryrefslogtreecommitdiff
path: root/tests/test_plugins.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-08-09 16:36:14 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-08-09 16:56:38 -0400
commit6c8ccb13e0dc78bed148fb0c1626e93429704a30 (patch)
treeeac3cd95c4932c7a83dbe7652e2fd52a9db65048 /tests/test_plugins.py
parentf5621baca33e193f03286acf998a92ac67f3b723 (diff)
downloadpython-coveragepy-git-6c8ccb13e0dc78bed148fb0c1626e93429704a30.tar.gz
test: a part-covered comprehension
The comprehension would only completely finish (->exit) if the assert was going to fail. So we expect it to not finish.
Diffstat (limited to 'tests/test_plugins.py')
-rw-r--r--tests/test_plugins.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/test_plugins.py b/tests/test_plugins.py
index 18c08507..ecc464cc 100644
--- a/tests/test_plugins.py
+++ b/tests/test_plugins.py
@@ -657,7 +657,8 @@ class BadFileTracerTest(FileTracerTest):
if excmsg:
assert excmsg in stderr
if excmsgs:
- assert any(em in stderr for em in excmsgs), f"expected one of {excmsgs} in stderr"
+ found_exc = any(em in stderr for em in excmsgs) # pragma: part covered
+ assert found_exc, f"expected one of {excmsgs} in stderr"
def test_file_tracer_has_no_file_tracer_method(self):
self.make_file("bad_plugin.py", """\