Docs: be more explicit about module level skip preventing collection (#10753)

This commit is contained in:
Ronny Pfannschmidt 2023-02-28 16:41:31 +01:00 committed by GitHub
parent 572b5657d7
commit 72ad32411f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

2
changelog/10753.doc.rst Normal file
View File

@ -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.

View File

@ -157,8 +157,12 @@ def skip(
The message to show the user as reason for the skip. The message to show the user as reason for the skip.
:param allow_module_level: :param allow_module_level:
Allows this function to be called at module level, skipping the rest Allows this function to be called at module level.
of the module. Defaults to False. 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: :param msg:
Same as ``reason``, but deprecated. Will be removed in a future version, use ``reason`` instead. Same as ``reason``, but deprecated. Will be removed in a future version, use ``reason`` instead.