From c88e6b65550f5e521ae56f26bee449179db4faa5 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sun, 9 Oct 2022 17:06:51 -0300 Subject: [PATCH] Code review requests --- .gitignore | 2 +- changelog/9886.deprecation.rst | 9 +++++++++ doc/en/deprecations.rst | 9 ++++++--- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 2b56271b8..3cac2474a 100644 --- a/.gitignore +++ b/.gitignore @@ -50,10 +50,10 @@ coverage.xml .project .settings .vscode +__pycache__/ # generated by pip pip-wheel-metadata/ # pytest debug logs generated via --debug pytestdebug.log -__pycache__/ diff --git a/changelog/9886.deprecation.rst b/changelog/9886.deprecation.rst index f178da0ff..94f51decf 100644 --- a/changelog/9886.deprecation.rst +++ b/changelog/9886.deprecation.rst @@ -1 +1,10 @@ The functionality for running tests written for ``nose`` has been officially deprecated. + +This includes: + +* Plain ``setup`` and ``teardown`` functions and methods: this might catch users by surprise, as ``setup()`` and ``teardown()`` are not pytest idioms, but part of the ``nose`` support. +* Setup/teardown using the `@with_setup `_ decorator. + +For more details, consult the :ref:`deprecation docs `. + +.. _`with-setup-nose`: https://nose.readthedocs.io/en/latest/testing_tools.html?highlight=with_setup#nose.tools.with_setup diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index 62a31fdad..10898c154 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -18,10 +18,13 @@ Deprecated Features Below is a complete list of all pytest features which are considered deprecated. Using those features will issue :class:`~pytest.PytestWarning` or subclasses, which can be filtered using :ref:`standard warning filters `. -Support for tests written for nose -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. deprecated:: 7.2.0 +.. _nose-deprecation: + +Support for tests written for nose +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. deprecated:: 7.2 Support for running tests written for `nose `__ is now deprecated.