Skip to content

Commit 5f83069

Browse files
docs: be more explicit about module level skip preventing collection
1 parent da626e7 commit 5f83069

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

changelog/10753.doc.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Change wording of the module level skip to be very explicit
2+
about not collecting and not executing the rest of the module.

src/_pytest/outcomes.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,11 @@ def skip(
157157
The message to show the user as reason for the skip.
158158
159159
:param allow_module_level:
160-
Allows this function to be called at module level, skipping the rest
161-
of the module. Defaults to False.
160+
Allows this function to be called at module level.
161+
Raising the skip exception in a module will stop the execution of the module.
162+
Additionally, the module will no longer be collected.
163+
164+
Defaults to False.
162165
163166
:param msg:
164167
Same as ``reason``, but deprecated. Will be removed in a future version, use ``reason`` instead.

0 commit comments

Comments
 (0)