* fixed changelog/*.rst docs * add author name * fixed-documents * fix issue 8761 doc * fix issue 8645 doc * fix issue 8447 doc * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
parent
501637547e
commit
8c25a14032
1
AUTHORS
1
AUTHORS
|
@ -107,6 +107,7 @@ Eli Boyarski
|
||||||
Elizaveta Shashkova
|
Elizaveta Shashkova
|
||||||
Endre Galaczi
|
Endre Galaczi
|
||||||
Eric Hunsberger
|
Eric Hunsberger
|
||||||
|
Eric Liu
|
||||||
Eric Siegerman
|
Eric Siegerman
|
||||||
Erik Aronesty
|
Erik Aronesty
|
||||||
Erik M. Bray
|
Erik M. Bray
|
||||||
|
|
|
@ -9,4 +9,4 @@ Directly constructing the following classes is now deprecated:
|
||||||
- ``_pytest.config.argparsing.Parser``
|
- ``_pytest.config.argparsing.Parser``
|
||||||
- ``_pytest.config.argparsing.OptionGroup``
|
- ``_pytest.config.argparsing.OptionGroup``
|
||||||
|
|
||||||
These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 7.0.0.
|
These have always been considered private, but now issue a deprecation warning, which may become a hard error in pytest 8.0.0.
|
||||||
|
|
|
@ -14,6 +14,6 @@ The newly-exported types are:
|
||||||
- ``pytest.OptionGroup`` for the :class:`OptionGroup <pytest.OptionGroup>` type returned from the :func:`parser.addgroup <pytest.Parser.getgroup>` method.
|
- ``pytest.OptionGroup`` for the :class:`OptionGroup <pytest.OptionGroup>` type returned from the :func:`parser.addgroup <pytest.Parser.getgroup>` method.
|
||||||
|
|
||||||
Constructing them directly is not supported; they are only meant for use in type annotations.
|
Constructing them directly is not supported; they are only meant for use in type annotations.
|
||||||
Doing so will emit a deprecation warning, and may become a hard-error in pytest 7.0.
|
Doing so will emit a deprecation warning, and may become a hard-error in pytest 8.0.
|
||||||
|
|
||||||
Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.
|
Subclassing them is also not supported. This is not currently enforced at runtime, but is detected by type-checkers such as mypy.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Raising :class:`unittest.SkipTest` to skip collection of tests during the
|
Raising :class:`unittest.SkipTest` to skip collection of tests during the
|
||||||
pytest collection phase is deprecated. Use :func:`pytest.skip` instead.
|
pytest collection phase is deprecated. Use :func:`pytest.skip` instead.
|
||||||
|
|
||||||
Note: This deprecation only relates to using `unittest.SkipTest` during test
|
Note: This deprecation only relates to using :class:`unittest.SkipTest` during test
|
||||||
collection. You are probably not doing that. Ordinary usage of
|
collection. You are probably not doing that. Ordinary usage of
|
||||||
:class:`unittest.SkipTest` / :meth:`unittest.TestCase.skipTest` /
|
:class:`unittest.SkipTest` / :meth:`unittest.TestCase.skipTest` /
|
||||||
:func:`unittest.skip` in unittest test cases is fully supported.
|
:func:`unittest.skip` in unittest test cases is fully supported.
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Internal Restructure: let python.PyObjMixing inherit from nodes.Node to carry over typing information.
|
Internal Restructure: let ``python.PyObjMixin`` inherit from ``nodes.Node`` to carry over typing information.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Several behaviors of :meth:`Parser.addoption <pytest.Parser.addoption>` are now
|
Several behaviors of :meth:`Parser.addoption <pytest.Parser.addoption>` are now
|
||||||
scheduled for removal in pytest 7 (deprecated since pytest 2.4.0):
|
scheduled for removal in pytest 8 (deprecated since pytest 2.4.0):
|
||||||
|
|
||||||
- ``parser.addoption(..., help=".. %default ..")`` - use ``%(default)s`` instead.
|
- ``parser.addoption(..., help=".. %default ..")`` - use ``%(default)s`` instead.
|
||||||
- ``parser.addoption(..., type="int/string/float/complex")`` - use ``type=int`` etc. instead.
|
- ``parser.addoption(..., type="int/string/float/complex")`` - use ``type=int`` etc. instead.
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Assert the outcomes for the issue 518 test and fix the test.
|
|
|
@ -1,4 +1,4 @@
|
||||||
Defining a custom pytest node type which is both an item and a collector now issues a warning.
|
Defining a custom pytest node type which is both an :class:`pytest.Item <Item>` and a :class:`pytest.Collector <Collector>` now issues a warning.
|
||||||
It was never sanely supported and triggers hard to debug errors.
|
It was never sanely supported and triggers hard to debug errors.
|
||||||
|
|
||||||
Instead, a separate collector node should be used, which collects the item. See :ref:`non-python tests` for an example.
|
Instead, a separate collector node should be used, which collects the item. See :ref:`non-python tests` for an example.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
Fixed issue where `TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
|
Fixed issue where :meth:`unittest.TestCase.setUpClass` is not called when a test has `/` in its name since pytest 6.2.0.
|
||||||
|
|
||||||
This refers to the path part in pytest node IDs, e.g. `TestClass::test_it` in the node ID `tests/test_file.py::TestClass::test_it`.
|
This refers to the path part in pytest node IDs, e.g. ``TestClass::test_it`` in the node ID ``tests/test_file.py::TestClass::test_it``.
|
||||||
|
|
||||||
Now, instead of assuming that the test name does not contain ``/``, it is assumed that test path does not contain ``::``. We plan to hopefully make both of these work in the future.
|
Now, instead of assuming that the test name does not contain ``/``, it is assumed that test path does not contain ``::``. We plan to hopefully make both of these work in the future.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
pytest invocations with ``--fixtures-per-test`` and ``--fixtures`` have been enabled with:
|
pytest invocations with ``--fixtures-per-test`` and ``--fixtures`` have been enriched with:
|
||||||
|
|
||||||
- Fixture location path printed with the fixture name.
|
- Fixture location path printed with the fixture name.
|
||||||
- First section of the fixture's docstring printed under the fixture name.
|
- First section of the fixture's docstring printed under the fixture name.
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
:func:`pytest.warns(None) <pytest.warns>` is now deprecated because many people used
|
||||||
|
it to mean "this code does not emit warnings", but it actually had the effect of
|
||||||
|
checking that the code emits at least one warning of any type - like ``pytest.warns()``
|
||||||
|
or ``pytest.warns(Warning)``.
|
|
@ -1,4 +0,0 @@
|
||||||
Reducing confusion from `pytest.warns(None)` by:
|
|
||||||
|
|
||||||
- Allowing no arguments to be passed in order to catch any exception (no argument defaults to `Warning`).
|
|
||||||
- Emit a deprecation warning if passed `None`.
|
|
Loading…
Reference in New Issue