File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -435,9 +435,9 @@ def _importtestmodule(self):
435435 if e .allow_module_level :
436436 raise
437437 raise self .CollectError (
438- "Using @ pytest.skip outside of a test (e.g. as a test "
439- "function decorator) is not allowed. Use @pytest.mark.skip or "
440- "@pytest.mark.skipif instead."
438+ "Using pytest.skip outside of a test is not allowed. If you are "
439+ "trying to decorate a test function, use the @pytest.mark.skip "
440+ "or @pytest.mark.skipif decorators instead."
441441 )
442442 self .config .pluginmanager .consider_module (mod )
443443 return mod
Original file line number Diff line number Diff line change @@ -967,5 +967,5 @@ def test_func():
967967 """ )
968968 result = testdir .runpytest ()
969969 result .stdout .fnmatch_lines (
970- "*Using @ pytest.skip outside of a test * is not allowed*"
970+ "*Using pytest.skip outside of a test is not allowed*"
971971 )
You can’t perform that action at this time.
0 commit comments