summaryrefslogtreecommitdiff
path: root/_pytest/python.py
diff options
context:
space:
mode:
Diffstat (limited to '_pytest/python.py')
-rw-r--r--_pytest/python.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/_pytest/python.py b/_pytest/python.py
index d0f13a758..29e3182d4 100644
--- a/_pytest/python.py
+++ b/_pytest/python.py
@@ -442,9 +442,10 @@ class Module(main.File, PyCollector):
if e.allow_module_level:
raise
raise self.CollectError(
- "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."
+ "Using pytest.skip outside of a test is not allowed. "
+ "To decorate a test function, use the @pytest.mark.skip "
+ "or @pytest.mark.skipif decorators instead, and to skip a "
+ "module use `pytestmark = pytest.mark.{skip,skipif}."
)
self.config.pluginmanager.consider_module(mod)
return mod