Skip to content

Commit

Permalink
Docs: be more explicit about module level skip preventing collection (p…
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt authored and aless10 committed Mar 1, 2023
1 parent 3e9e70a commit c20cb1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelog/10753.doc.rst
@@ -0,0 +1,2 @@
Change wording of the module level skip to be very explicit
about not collecting and not executing the rest of the module.
8 changes: 6 additions & 2 deletions src/_pytest/outcomes.py
Expand Up @@ -157,8 +157,12 @@ def skip(
The message to show the user as reason for the skip.
:param allow_module_level:
Allows this function to be called at module level, skipping the rest
of the module. Defaults to False.
Allows this function to be called at module level.
Raising the skip exception at module level will stop
the execution of the module and prevent the collection of all tests in the module,
even those defined before the `skip` call.
Defaults to False.
:param msg:
Same as ``reason``, but deprecated. Will be removed in a future version, use ``reason`` instead.
Expand Down

0 comments on commit c20cb1c

Please sign in to comment.