diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/conftest.py | 3 | ||||
| -rw-r--r-- | tests/coveragetest.py | 5 | ||||
| -rw-r--r-- | tests/test_cmdline.py | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index aeccec88..e9802517 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,9 +7,10 @@ Pytest auto configuration. This module is run automatically by pytest, to define and enable fixtures. """ -import pytest import warnings +import pytest + from coverage import env diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 15c61ece..378097c8 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -40,14 +40,13 @@ TESTS_DIR = os.path.dirname(__file__) def convert_skip_exceptions(method): """A decorator for test methods to convert StopEverything to SkipTest.""" @functools.wraps(method) - def wrapper(*args, **kwargs): - """Run the test method, and convert exceptions.""" + def _wrapper(*args, **kwargs): try: result = method(*args, **kwargs) except StopEverything: raise unittest.SkipTest("StopEverything!") return result - return wrapper + return _wrapper class SkipConvertingMetaclass(type): diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py index 92867a54..db89137b 100644 --- a/tests/test_cmdline.py +++ b/tests/test_cmdline.py @@ -470,7 +470,7 @@ class CmdLineTest(BaseCmdLineTest): # config file. self.command_line("run --concurrency=multiprocessing --branch foo.py", ret=ERR) self.assertIn( - "Options affecting multiprocessing must be specified in a configuration file.", + "Options affecting multiprocessing must only be specified in a configuration file.", self.stderr() ) |
