summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRan Benita <ran@unusedvar.com>2021-01-18 17:46:00 +0200
committerGitHub <noreply@github.com>2021-01-18 17:46:00 +0200
commit7f782c72ba157aaa26f74553ab328c898dab949c (patch)
tree7424e881d31481d78ada3929544e9204cccc409a /doc
parentc9e9a599fe5231da90967b6f77c73e17c12740b7 (diff)
parent25e657bfc15aecd8fa8787a028ffc10fc9ac96d5 (diff)
downloadpytest-7f782c72ba157aaa26f74553ab328c898dab949c.tar.gz
Merge pull request #8242 from bluetech/deprecate-unittest-skip-collection
Deprecate raising unittest.SkipTest to skip tests during collection
Diffstat (limited to 'doc')
-rw-r--r--doc/en/deprecations.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst
index ec2397e59..0dcbd8ceb 100644
--- a/doc/en/deprecations.rst
+++ b/doc/en/deprecations.rst
@@ -18,6 +18,20 @@ Deprecated Features
Below is a complete list of all pytest features which are considered deprecated. Using those features will issue
:class:`PytestWarning` or subclasses, which can be filtered using :ref:`standard warning filters <warnings>`.
+Raising ``unittest.SkipTest`` during collection
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+.. deprecated:: 6.3
+
+Raising :class:`unittest.SkipTest` to skip collection of tests during the
+pytest collection phase is deprecated. Use :func:`pytest.skip` instead.
+
+Note: This deprecation only relates to using `unittest.SkipTest` during test
+collection. You are probably not doing that. Ordinary usage of
+:class:`unittest.SkipTest` / :meth:`unittest.TestCase.skipTest` /
+:func:`unittest.skip` in unittest test cases is fully supported.
+
+
The ``--strict`` command-line option
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~