| 1 | diff --git a/src/_pytest/python.py b/src/_pytest/python.py |
| 2 | --- a/src/_pytest/python.py |
| 3 | +++ b/src/_pytest/python.py |
| 4 | @@ -608,10 +608,10 @@ def _importtestmodule(self): |
| 5 | if e.allow_module_level: |
| 6 | raise |
| 7 | raise self.CollectError( |
| 8 | - "Using pytest.skip outside of a test is not allowed. " |
| 9 | - "To decorate a test function, use the @pytest.mark.skip " |
| 10 | - "or @pytest.mark.skipif decorators instead, and to skip a " |
| 11 | - "module use `pytestmark = pytest.mark.{skip,skipif}." |
| 12 | + "Using pytest.skip outside of a test will skip the entire module. " |
| 13 | + "If that's your intention, pass `allow_module_level=True`. " |
| 14 | + "If you want to skip a specific test or an entire class, " |
| 15 | + "use the @pytest.mark.skip or @pytest.mark.skipif decorators." |
| 16 | ) from e |
| 17 | self.config.pluginmanager.consider_module(mod) |
| 18 | return mod |