diff options
author | Bruno Oliveira <nicoddemus@gmail.com> | 2016-10-01 14:44:49 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-01 14:44:49 -0300 |
commit | fc02003220ccf9b2fbd2d6c9e8f4b32a6bdc731d (patch) | |
tree | 55e889acd303475413de7968dc1ac4f1ebc099fc | |
parent | a87b1c79c17128a1e62832149ae5cae454ecf6b2 (diff) | |
parent | 336d7900c587caa35c0bb9067bf6820fe66a89ea (diff) | |
download | pytest-fc02003220ccf9b2fbd2d6c9e8f4b32a6bdc731d.tar.gz |
Merge pull request #1975 from nicoddemus/pytest-skip-message
Pytest skip message
-rw-r--r-- | _pytest/python.py | 6 | ||||
-rw-r--r-- | testing/test_skipping.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/_pytest/python.py b/_pytest/python.py index eacea994d..548d7cfa5 100644 --- a/_pytest/python.py +++ b/_pytest/python.py @@ -435,9 +435,9 @@ class Module(pytest.File, PyCollector): if e.allow_module_level: raise raise self.CollectError( - "Using @pytest.skip outside of a test (e.g. as a test " - "function decorator) is not allowed. Use @pytest.mark.skip or " - "@pytest.mark.skipif instead." + "Using pytest.skip outside of a test is not allowed. If you are " + "trying to decorate a test function, use the @pytest.mark.skip " + "or @pytest.mark.skipif decorators instead." ) self.config.pluginmanager.consider_module(mod) return mod diff --git a/testing/test_skipping.py b/testing/test_skipping.py index 12b18ca33..2e7868d3a 100644 --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -967,5 +967,5 @@ def test_module_level_skip_error(testdir): """) result = testdir.runpytest() result.stdout.fnmatch_lines( - "*Using @pytest.skip outside of a test * is not allowed*" + "*Using pytest.skip outside of a test is not allowed*" ) |