diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_execfile.py | 4 | ||||
-rw-r--r-- | tests/test_plugins.py | 3 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tests/test_execfile.py b/tests/test_execfile.py index fe02f5fe..c0ed2d48 100644 --- a/tests/test_execfile.py +++ b/tests/test_execfile.py @@ -4,13 +4,11 @@ """Tests for coverage.execfile""" import compileall -import fnmatch import json import os import os.path import pathlib import re -import sys import pytest @@ -107,7 +105,7 @@ class RunFileTest(CoverageTest): class RunPycFileTest(CoverageTest): """Test cases for `run_python_file`.""" - def make_pyc(self): # pylint: disable=inconsistent-return-statements + def make_pyc(self): """Create a .pyc file, and return the path to it.""" if env.JYTHON: pytest.skip("Can't make .pyc files on Jython") 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", """\ |