Skip to content

Commit 3035476

Browse files
committed
Tweak error message
1 parent 8364c03 commit 3035476

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/_pytest/python.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,9 +608,9 @@ def _importtestmodule(self):
608608
if e.allow_module_level:
609609
raise
610610
raise self.CollectError(
611-
"Using pytest.skip outside will skip the entire module, "
612-
"if that's your intention pass `allow_module_level=True`. "
613-
"If you want to skip a specific test or entire class, "
611+
"Using pytest.skip outside of a test will skip the entire module. "
612+
"If that's your intention, pass `allow_module_level=True`. "
613+
"If you want to skip a specific test or an entire class, "
614614
"use the @pytest.mark.skip or @pytest.mark.skipif decorators."
615615
) from e
616616
self.config.pluginmanager.consider_module(mod)

testing/test_skipping.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1341,7 +1341,7 @@ def test_func():
13411341
)
13421342
result = pytester.runpytest()
13431343
result.stdout.fnmatch_lines(
1344-
["*Using pytest.skip outside will skip the entire module*"]
1344+
["*Using pytest.skip outside of a test will skip the entire module*"]
13451345
)
13461346

13471347

0 commit comments

Comments
 (0)