Merge branch 'main' into pytest.raises-match-Exception-repr
This commit is contained in:
commit
e80ecd8493
|
@ -43,6 +43,7 @@ jobs:
|
|||
"windows-py39",
|
||||
"windows-py310",
|
||||
"windows-py311",
|
||||
"windows-py312",
|
||||
|
||||
"ubuntu-py37",
|
||||
"ubuntu-py37-pluggy",
|
||||
|
@ -51,12 +52,13 @@ jobs:
|
|||
"ubuntu-py39",
|
||||
"ubuntu-py310",
|
||||
"ubuntu-py311",
|
||||
"ubuntu-py312",
|
||||
"ubuntu-pypy3",
|
||||
|
||||
"macos-py37",
|
||||
"macos-py38",
|
||||
"macos-py39",
|
||||
"macos-py310",
|
||||
"macos-py312",
|
||||
|
||||
"docs",
|
||||
"doctesting",
|
||||
|
@ -86,9 +88,13 @@ jobs:
|
|||
os: windows-latest
|
||||
tox_env: "py310-xdist"
|
||||
- name: "windows-py311"
|
||||
python: "3.11-dev"
|
||||
python: "3.11"
|
||||
os: windows-latest
|
||||
tox_env: "py311"
|
||||
- name: "windows-py312"
|
||||
python: "3.12-dev"
|
||||
os: windows-latest
|
||||
tox_env: "py312"
|
||||
|
||||
- name: "ubuntu-py37"
|
||||
python: "3.7"
|
||||
|
@ -116,10 +122,15 @@ jobs:
|
|||
os: ubuntu-latest
|
||||
tox_env: "py310-xdist"
|
||||
- name: "ubuntu-py311"
|
||||
python: "3.11-dev"
|
||||
python: "3.11"
|
||||
os: ubuntu-latest
|
||||
tox_env: "py311"
|
||||
use_coverage: true
|
||||
- name: "ubuntu-py312"
|
||||
python: "3.12-dev"
|
||||
os: ubuntu-latest
|
||||
tox_env: "py312"
|
||||
use_coverage: true
|
||||
- name: "ubuntu-pypy3"
|
||||
python: "pypy-3.7"
|
||||
os: ubuntu-latest
|
||||
|
@ -129,19 +140,19 @@ jobs:
|
|||
python: "3.7"
|
||||
os: macos-latest
|
||||
tox_env: "py37-xdist"
|
||||
- name: "macos-py38"
|
||||
python: "3.8"
|
||||
os: macos-latest
|
||||
tox_env: "py38-xdist"
|
||||
use_coverage: true
|
||||
- name: "macos-py39"
|
||||
python: "3.9"
|
||||
os: macos-latest
|
||||
tox_env: "py39-xdist"
|
||||
use_coverage: true
|
||||
- name: "macos-py310"
|
||||
python: "3.10"
|
||||
os: macos-latest
|
||||
tox_env: "py310-xdist"
|
||||
- name: "macos-py312"
|
||||
python: "3.12-dev"
|
||||
os: macos-latest
|
||||
tox_env: "py312-xdist"
|
||||
|
||||
- name: "plugins"
|
||||
python: "3.9"
|
||||
|
@ -168,6 +179,7 @@ jobs:
|
|||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: ${{ matrix.python }}
|
||||
check-latest: ${{ endsWith(matrix.python, '-dev') }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
|
|
@ -47,10 +47,10 @@ repos:
|
|||
- id: pyupgrade
|
||||
args: [--py37-plus]
|
||||
- repo: https://github.com/asottile/setup-cfg-fmt
|
||||
rev: v2.2.0
|
||||
rev: v2.3.0
|
||||
hooks:
|
||||
- id: setup-cfg-fmt
|
||||
args: ["--max-py-version=3.11", "--include-version-classifiers"]
|
||||
args: ["--max-py-version=3.12", "--include-version-classifiers"]
|
||||
- repo: https://github.com/pre-commit/pygrep-hooks
|
||||
rev: v1.10.0
|
||||
hooks:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Fix bug where very long option names could cause pytest to break with ``OSError: [Errno 36] File name too long`` on some systems.
|
|
@ -1 +0,0 @@
|
|||
:confval:`testpaths` is now honored to load root ``conftests``.
|
|
@ -1 +0,0 @@
|
|||
The `monkeypatch` `setitem`/`delitem` type annotations now allow `TypedDict` arguments.
|
|
@ -1 +0,0 @@
|
|||
Fixed bug in assertion rewriting where a variable assigned with the walrus operator could not be used later in a function call.
|
|
@ -1 +0,0 @@
|
|||
Fixed ``--last-failed``'s "(skipped N files)" functionality for files inside of packages (directories with `__init__.py` files).
|
|
@ -0,0 +1 @@
|
|||
Fixed the ``--last-failed`` whole-file skipping functionality ("skipped N files") for :ref:`non-python test files <non-python tests>`.
|
|
@ -0,0 +1,7 @@
|
|||
The :confval:`norecursedir` check is now performed in a :hook:`pytest_ignore_collect` implementation, so plugins can affect it.
|
||||
|
||||
If after updating to this version you see that your `norecursedir` setting is not being respected,
|
||||
it means that a conftest or a plugin you use has a bad `pytest_ignore_collect` implementation.
|
||||
Most likely, your hook returns `False` for paths it does not want to ignore,
|
||||
which ends the processing and doesn't allow other plugins, including pytest itself, to ignore the path.
|
||||
The fix is to return `None` instead of `False` for paths your hook doesn't want to ignore.
|
|
@ -6,6 +6,7 @@ Release announcements
|
|||
:maxdepth: 2
|
||||
|
||||
|
||||
release-7.3.2
|
||||
release-7.3.1
|
||||
release-7.3.0
|
||||
release-7.2.2
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
pytest-7.3.2
|
||||
=======================================
|
||||
|
||||
pytest 7.3.2 has just been released to PyPI.
|
||||
|
||||
This is a bug-fix release, being a drop-in replacement. To upgrade::
|
||||
|
||||
pip install --upgrade pytest
|
||||
|
||||
The full changelog is available at https://docs.pytest.org/en/stable/changelog.html.
|
||||
|
||||
Thanks to all of the contributors to this release:
|
||||
|
||||
* Adam J. Stewart
|
||||
* Alessio Izzo
|
||||
* Bruno Oliveira
|
||||
* Ran Benita
|
||||
|
||||
|
||||
Happy testing,
|
||||
The pytest Development Team
|
|
@ -207,7 +207,7 @@ For information about fixtures, see :ref:`fixtures`. To see a complete list of a
|
|||
* caplog.record_tuples -> list of (logger_name, level, message) tuples
|
||||
* caplog.clear() -> clear captured records and formatted log output string
|
||||
|
||||
monkeypatch -- .../_pytest/monkeypatch.py:29
|
||||
monkeypatch -- .../_pytest/monkeypatch.py:30
|
||||
A convenient fixture for monkey-patching.
|
||||
|
||||
The fixture provides these methods to modify objects, dictionaries, or
|
||||
|
|
|
@ -28,6 +28,30 @@ with advance notice in the **Deprecations** section of releases.
|
|||
|
||||
.. towncrier release notes start
|
||||
|
||||
pytest 7.3.2 (2023-06-10)
|
||||
=========================
|
||||
|
||||
Bug Fixes
|
||||
---------
|
||||
|
||||
- `#10169 <https://github.com/pytest-dev/pytest/issues/10169>`_: Fix bug where very long option names could cause pytest to break with ``OSError: [Errno 36] File name too long`` on some systems.
|
||||
|
||||
|
||||
- `#10894 <https://github.com/pytest-dev/pytest/issues/10894>`_: Support for Python 3.12 (beta at the time of writing).
|
||||
|
||||
|
||||
- `#10987 <https://github.com/pytest-dev/pytest/issues/10987>`_: :confval:`testpaths` is now honored to load root ``conftests``.
|
||||
|
||||
|
||||
- `#10999 <https://github.com/pytest-dev/pytest/issues/10999>`_: The `monkeypatch` `setitem`/`delitem` type annotations now allow `TypedDict` arguments.
|
||||
|
||||
|
||||
- `#11028 <https://github.com/pytest-dev/pytest/issues/11028>`_: Fixed bug in assertion rewriting where a variable assigned with the walrus operator could not be used later in a function call.
|
||||
|
||||
|
||||
- `#11054 <https://github.com/pytest-dev/pytest/issues/11054>`_: Fixed ``--last-failed``'s "(skipped N files)" functionality for files inside of packages (directories with `__init__.py` files).
|
||||
|
||||
|
||||
pytest 7.3.1 (2023-04-14)
|
||||
=========================
|
||||
|
||||
|
|
|
@ -691,7 +691,7 @@ Here is an example for making a ``db`` fixture available in a directory:
|
|||
pass
|
||||
|
||||
|
||||
@pytest.fixture(scope="session")
|
||||
@pytest.fixture(scope="package")
|
||||
def db():
|
||||
return DB()
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ Install ``pytest``
|
|||
.. code-block:: bash
|
||||
|
||||
$ pytest --version
|
||||
pytest 7.3.1
|
||||
pytest 7.3.2
|
||||
|
||||
.. _`simpletest`:
|
||||
|
||||
|
|
|
@ -5,19 +5,22 @@ Plugin List
|
|||
===========
|
||||
|
||||
PyPI projects that match "pytest-\*" are considered plugins and are listed
|
||||
automatically. Packages classified as inactive are excluded.
|
||||
automatically together with a manually-maintained list in `the source
|
||||
code <https://github.com/pytest-dev/pytest/blob/main/scripts/update-plugin-list.py>`_.
|
||||
Packages classified as inactive are excluded.
|
||||
|
||||
.. The following conditional uses a different format for this list when
|
||||
creating a PDF, because otherwise the table gets far too wide for the
|
||||
page.
|
||||
|
||||
This list contains 1259 plugins.
|
||||
This list contains 1261 plugins.
|
||||
|
||||
.. only:: not latex
|
||||
|
||||
=============================================== ======================================================================================================================================================================================================== ============== ===================== ================================================
|
||||
name summary last release status requires
|
||||
=============================================== ======================================================================================================================================================================================================== ============== ===================== ================================================
|
||||
:pypi:`logassert` Simple but powerful assertion and verification of logged lines. May 20, 2022 5 - Production/Stable N/A
|
||||
:pypi:`pytest-abq` Pytest integration for the ABQ universal test runner. Apr 07, 2023 N/A N/A
|
||||
:pypi:`pytest-abstracts` A contextmanager pytest fixture for handling multiple mock abstracts May 25, 2022 N/A N/A
|
||||
:pypi:`pytest-accept` A pytest-plugin for updating doctest outputs Dec 21, 2022 N/A pytest (>=6,<8)
|
||||
|
@ -83,7 +86,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-astropy-header` pytest plugin to add diagnostic information to the header of the test output Sep 06, 2022 3 - Alpha pytest (>=4.6)
|
||||
:pypi:`pytest-ast-transformer` May 04, 2019 3 - Alpha pytest
|
||||
:pypi:`pytest-asyncio` Pytest support for asyncio Mar 19, 2023 4 - Beta pytest (>=7.0.0)
|
||||
:pypi:`pytest-asyncio-cooperative` Run all your asynchronous tests cooperatively. Feb 10, 2023 N/A N/A
|
||||
:pypi:`pytest-asyncio-cooperative` Run all your asynchronous tests cooperatively. May 31, 2023 N/A N/A
|
||||
:pypi:`pytest-asyncio-network-simulator` pytest-asyncio-network-simulator: Plugin for pytest for simulator the network in tests Jul 31, 2018 3 - Alpha pytest (<3.7.0,>=3.3.2)
|
||||
:pypi:`pytest-async-mongodb` pytest plugin for async MongoDB Oct 18, 2017 5 - Production/Stable pytest (>=2.5.2)
|
||||
:pypi:`pytest-async-sqlalchemy` Database testing fixtures using the SQLAlchemy asyncio API Oct 07, 2021 4 - Beta pytest (>=6.0.0)
|
||||
|
@ -213,7 +216,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-concurrent` Concurrently execute test cases with multithread, multiprocess and gevent Jan 12, 2019 4 - Beta pytest (>=3.1.1)
|
||||
:pypi:`pytest-config` Base configurations and utilities for developing your Python project test suite with pytest. Nov 07, 2014 5 - Production/Stable N/A
|
||||
:pypi:`pytest-confluence-report` Package stands for pytest plugin to upload results into Confluence page. Apr 17, 2022 N/A N/A
|
||||
:pypi:`pytest-console-scripts` Pytest plugin for testing console scripts May 22, 2023 4 - Beta N/A
|
||||
:pypi:`pytest-console-scripts` Pytest plugin for testing console scripts May 31, 2023 4 - Beta pytest (>=4.0.0)
|
||||
:pypi:`pytest-consul` pytest plugin with fixtures for testing consul aware apps Nov 24, 2018 3 - Alpha pytest
|
||||
:pypi:`pytest-container` Pytest fixtures for writing container based tests Mar 21, 2023 4 - Beta pytest (>=3.10)
|
||||
:pypi:`pytest-contextfixture` Define pytest fixtures as context managers. Mar 12, 2013 4 - Beta N/A
|
||||
|
@ -228,7 +231,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-coveragemarkers` Using pytest markers to track functional coverage and filtering of tests Nov 29, 2022 N/A pytest (>=7.1.2,<8.0.0)
|
||||
:pypi:`pytest-cov-exclude` Pytest plugin for excluding tests based on coverage data Apr 29, 2016 4 - Beta pytest (>=2.8.0,<2.9.0); extra == 'dev'
|
||||
:pypi:`pytest-cpp` Use pytest's runner to discover and execute C++ tests Jan 30, 2023 5 - Production/Stable pytest (>=7.0)
|
||||
:pypi:`pytest-cppython` A pytest plugin that imports CPPython testing types May 25, 2023 N/A N/A
|
||||
:pypi:`pytest-cppython` A pytest plugin that imports CPPython testing types Jun 02, 2023 N/A N/A
|
||||
:pypi:`pytest-cqase` Custom qase pytest plugin Aug 22, 2022 N/A pytest (>=7.1.2,<8.0.0)
|
||||
:pypi:`pytest-cram` Run cram tests with pytest. Aug 08, 2020 N/A N/A
|
||||
:pypi:`pytest-crate` Manages CrateDB instances during your integration tests May 28, 2019 3 - Alpha pytest (>=4.0)
|
||||
|
@ -268,6 +271,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-db` Session scope fixture "db" for mysql query or change Dec 04, 2019 N/A N/A
|
||||
:pypi:`pytest-dbfixtures` Databases fixtures plugin for py.test. Dec 07, 2016 4 - Beta N/A
|
||||
:pypi:`pytest-db-plugin` Nov 27, 2021 N/A pytest (>=5.0)
|
||||
:pypi:`pytest-dbt` Unit test dbt models with standard python tooling May 31, 2023 2 - Pre-Alpha pytest (>=7.0.0,<8.0.0)
|
||||
:pypi:`pytest-dbt-adapter` A pytest plugin for testing dbt adapter plugins Nov 24, 2021 N/A pytest (<7,>=6)
|
||||
:pypi:`pytest-dbt-conventions` A pytest plugin for linting a dbt project's conventions Mar 02, 2022 N/A pytest (>=6.2.5,<7.0.0)
|
||||
:pypi:`pytest-dbt-core` Pytest extension for dbt. May 03, 2023 N/A pytest (>=6.2.5) ; extra == 'test'
|
||||
|
@ -304,7 +308,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-django-filefield` Replaces FileField.storage with something you can patch globally. May 09, 2022 5 - Production/Stable pytest >= 5.2
|
||||
:pypi:`pytest-django-gcir` A Django plugin for pytest. Mar 06, 2018 5 - Production/Stable N/A
|
||||
:pypi:`pytest-django-haystack` Cleanup your Haystack indexes between tests Sep 03, 2017 5 - Production/Stable pytest (>=2.3.4)
|
||||
:pypi:`pytest-django-ifactory` A model instance factory for pytest-django May 21, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-django-ifactory` A model instance factory for pytest-django Jun 06, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-django-lite` The bare minimum to integrate py.test with Django. Jan 30, 2014 N/A N/A
|
||||
:pypi:`pytest-django-liveserver-ssl` Jan 20, 2022 3 - Alpha N/A
|
||||
:pypi:`pytest-django-model` A Simple Way to Test your Django Models Feb 14, 2019 4 - Beta N/A
|
||||
|
@ -366,13 +370,13 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-eliot` An eliot plugin for pytest. Aug 31, 2022 1 - Planning pytest (>=5.4.0)
|
||||
:pypi:`pytest-elk-reporter` A simple plugin to use with pytest Jan 24, 2021 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-email` Send execution result email Jul 08, 2020 N/A pytest
|
||||
:pypi:`pytest-embedded` pytest embedded plugin Apr 11, 2023 N/A pytest (>=7.0)
|
||||
:pypi:`pytest-embedded-arduino` pytest embedded plugin for Arduino projects Apr 11, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded-idf` pytest embedded plugin for esp-idf project Apr 11, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded-jtag` pytest embedded plugin for testing with jtag Apr 11, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded-qemu` pytest embedded plugin for qemu, not target chip Apr 11, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded-serial` pytest embedded plugin for testing serial ports Apr 11, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded-serial-esp` pytest embedded plugin for testing espressif boards via serial ports Apr 11, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded` pytest embedded plugin Jun 06, 2023 N/A pytest (>=7.0)
|
||||
:pypi:`pytest-embedded-arduino` pytest embedded plugin for Arduino projects Jun 06, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-embedded-idf` pytest embedded plugin for esp-idf project Jun 06, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-embedded-jtag` pytest embedded plugin for testing with jtag Jun 06, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded-qemu` pytest embedded plugin for qemu, not target chip Jun 06, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-embedded-serial` pytest embedded plugin for testing serial ports Jun 06, 2023 N/A N/A
|
||||
:pypi:`pytest-embedded-serial-esp` pytest embedded plugin for testing espressif boards via serial ports Jun 06, 2023 N/A N/A
|
||||
:pypi:`pytest-embrace` 💝 Dataclasses-as-tests. Describe the runtime once and multiply coverage with no boilerplate. Mar 25, 2023 N/A pytest (>=7.0,<8.0)
|
||||
:pypi:`pytest-emoji` A pytest plugin that adds emojis to your test result report Feb 19, 2019 4 - Beta pytest (>=4.2.1)
|
||||
:pypi:`pytest-emoji-output` Pytest plugin to represent test output with emoji support Apr 09, 2023 4 - Beta pytest (==7.0.1)
|
||||
|
@ -486,7 +490,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-gherkin` A flexible framework for executing BDD gherkin tests Jul 27, 2019 3 - Alpha pytest (>=5.0.0)
|
||||
:pypi:`pytest-gh-log-group` pytest plugin for gh actions Jan 11, 2022 3 - Alpha pytest
|
||||
:pypi:`pytest-ghostinspector` For finding/executing Ghost Inspector tests May 17, 2016 3 - Alpha N/A
|
||||
:pypi:`pytest-girder` A set of pytest fixtures for testing Girder applications. May 22, 2023 N/A N/A
|
||||
:pypi:`pytest-girder` A set of pytest fixtures for testing Girder applications. May 31, 2023 N/A N/A
|
||||
:pypi:`pytest-git` Git repository fixture for py.test May 28, 2019 5 - Production/Stable pytest
|
||||
:pypi:`pytest-gitcov` Pytest plugin for reporting on coverage of the last git commit. Jan 11, 2020 2 - Pre-Alpha N/A
|
||||
:pypi:`pytest-git-fixtures` Pytest fixtures for testing with git. Mar 11, 2021 4 - Beta pytest
|
||||
|
@ -518,7 +522,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-historic` Custom report to display pytest historical execution records Apr 08, 2020 N/A pytest
|
||||
:pypi:`pytest-historic-hook` Custom listener to store execution results into MYSQL DB, which is used for pytest-historic report Apr 08, 2020 N/A pytest
|
||||
:pypi:`pytest-homeassistant` A pytest plugin for use with homeassistant custom components. Aug 12, 2020 4 - Beta N/A
|
||||
:pypi:`pytest-homeassistant-custom-component` Experimental package to automatically extract test plugins for Home Assistant custom components May 24, 2023 3 - Alpha pytest (==7.3.1)
|
||||
:pypi:`pytest-homeassistant-custom-component` Experimental package to automatically extract test plugins for Home Assistant custom components Jun 06, 2023 3 - Alpha pytest (==7.3.1)
|
||||
:pypi:`pytest-honey` A simple plugin to use with pytest Jan 07, 2022 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-honors` Report on tests that honor constraints, and guard against regressions Mar 06, 2020 4 - Beta N/A
|
||||
:pypi:`pytest-hot-reloading` May 18, 2023 N/A N/A
|
||||
|
@ -540,7 +544,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-http-mocker` Pytest plugin for http mocking (via https://github.com/vilus/mocker) Oct 20, 2019 N/A N/A
|
||||
:pypi:`pytest-httpretty` A thin wrapper of HTTPretty for pytest Feb 16, 2014 3 - Alpha N/A
|
||||
:pypi:`pytest-httpserver` pytest-httpserver is a httpserver for pytest May 22, 2023 3 - Alpha N/A
|
||||
:pypi:`pytest-httptesting` http_testing framework on top of pytest Apr 19, 2023 N/A pytest (>=7.2.0,<8.0.0)
|
||||
:pypi:`pytest-httptesting` http_testing framework on top of pytest Jun 03, 2023 N/A pytest (>=7.2.0,<8.0.0)
|
||||
:pypi:`pytest-httpx` Send responses to httpx. Apr 12, 2023 5 - Production/Stable pytest (<8.0,>=6.0)
|
||||
:pypi:`pytest-httpx-blockage` Disable httpx requests during a test run Feb 16, 2023 N/A pytest (>=7.2.1)
|
||||
:pypi:`pytest-hue` Visualise PyTest status via your Phillips Hue lights May 09, 2019 N/A N/A
|
||||
|
@ -573,7 +577,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-interactive` A pytest plugin for console based interactive test selection just after the collection phase Nov 30, 2017 3 - Alpha N/A
|
||||
:pypi:`pytest-intercept-remote` Pytest plugin for intercepting outgoing connection requests during pytest run. May 24, 2021 4 - Beta pytest (>=4.6)
|
||||
:pypi:`pytest-interface-tester` Pytest plugin for checking charm relation interface protocol compliance. May 09, 2023 4 - Beta pytest
|
||||
:pypi:`pytest-invenio` Pytest fixtures for Invenio. Apr 13, 2023 5 - Production/Stable pytest (<7.2.0,>=6)
|
||||
:pypi:`pytest-invenio` Pytest fixtures for Invenio. Jun 02, 2023 5 - Production/Stable pytest (<7.2.0,>=6)
|
||||
:pypi:`pytest-involve` Run tests covering a specific file or changeset Feb 02, 2020 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-ipdb` A py.test plug-in to enable drop to ipdb debugger on test failure. Mar 20, 2013 2 - Pre-Alpha N/A
|
||||
:pypi:`pytest-ipynb` THIS PROJECT IS ABANDONED Jan 29, 2019 3 - Alpha N/A
|
||||
|
@ -589,7 +593,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-jinja` A plugin to generate customizable jinja-based HTML reports in pytest Oct 04, 2022 3 - Alpha pytest (>=6.2.5,<7.0.0)
|
||||
:pypi:`pytest-jira` py.test JIRA integration plugin, using markers Apr 07, 2022 3 - Alpha N/A
|
||||
:pypi:`pytest-jira-xfail` Plugin skips (xfail) tests if unresolved Jira issue(s) linked Dec 01, 2022 N/A pytest (~=7.2.0)
|
||||
:pypi:`pytest-jira-xray` pytest plugin to integrate tests with JIRA XRAY May 15, 2023 4 - Beta pytest
|
||||
:pypi:`pytest-jira-xray` pytest plugin to integrate tests with JIRA XRAY May 29, 2023 4 - Beta pytest
|
||||
:pypi:`pytest-job-selection` A pytest plugin for load balancing test suites Jan 30, 2023 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-jobserver` Limit parallel tests with posix jobserver. May 15, 2019 5 - Production/Stable pytest
|
||||
:pypi:`pytest-joke` Test failures are better served with humor. Oct 08, 2019 4 - Beta pytest (>=4.2.1)
|
||||
|
@ -620,7 +624,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-launchable` Launchable Pytest Plugin Apr 05, 2023 N/A pytest (>=4.2.0)
|
||||
:pypi:`pytest-layab` Pytest fixtures for layab. Oct 05, 2020 5 - Production/Stable N/A
|
||||
:pypi:`pytest-lazy-fixture` It helps to use fixtures in pytest.mark.parametrize Feb 01, 2020 4 - Beta pytest (>=3.2.5)
|
||||
:pypi:`pytest-lazy-fixtures` Allows you to use fixtures in @pytest.mark.parametrize. Mar 11, 2023 N/A pytest (>=7.2.1,<8.0.0)
|
||||
:pypi:`pytest-lazy-fixtures` Allows you to use fixtures in @pytest.mark.parametrize. May 28, 2023 N/A pytest (>=7.2.1,<8.0.0)
|
||||
:pypi:`pytest-ldap` python-ldap fixtures for pytest Aug 18, 2020 N/A pytest
|
||||
:pypi:`pytest-leak-finder` Find the test that's leaking before the one that fails Feb 15, 2023 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-leaks` A pytest plugin to trace resource leaks. Nov 27, 2019 1 - Planning N/A
|
||||
|
@ -649,7 +653,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-logger` Plugin configuring handlers for loggers from Python logging module. Jul 25, 2019 4 - Beta pytest (>=3.2)
|
||||
:pypi:`pytest-logging` Configures logging and allows tweaking the log level with a py.test flag Nov 04, 2015 4 - Beta N/A
|
||||
:pypi:`pytest-logging-end-to-end-test-tool` Sep 23, 2022 N/A pytest (>=7.1.2,<8.0.0)
|
||||
:pypi:`pytest-logikal` Common testing environment May 27, 2023 5 - Production/Stable pytest (==7.3.1)
|
||||
:pypi:`pytest-logikal` Common testing environment Jun 04, 2023 5 - Production/Stable pytest (==7.3.1)
|
||||
:pypi:`pytest-log-report` Package for creating a pytest test run reprot Dec 26, 2019 N/A N/A
|
||||
:pypi:`pytest-loguru` Pytest Loguru Apr 12, 2022 5 - Production/Stable N/A
|
||||
:pypi:`pytest-loop` pytest plugin for looping tests Jul 22, 2022 5 - Production/Stable pytest (>=6)
|
||||
|
@ -671,10 +675,10 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-maybe-raises` Pytest fixture for optional exception testing. May 27, 2022 N/A pytest ; extra == 'dev'
|
||||
:pypi:`pytest-mccabe` pytest plugin to run the mccabe code complexity checker. Jul 22, 2020 3 - Alpha pytest (>=5.4.0)
|
||||
:pypi:`pytest-md` Plugin for generating Markdown reports for pytest results Jul 11, 2019 3 - Alpha pytest (>=4.2.1)
|
||||
:pypi:`pytest-md-report` A pytest plugin to make a test results report with Markdown table format. Aug 06, 2022 4 - Beta pytest (!=6.0.0,<8,>=3.3.2)
|
||||
:pypi:`pytest-md-report` A pytest plugin to make a test results report with Markdown table format. May 28, 2023 4 - Beta pytest (!=6.0.0,<8,>=3.3.2)
|
||||
:pypi:`pytest-memlog` Log memory usage during tests May 03, 2023 N/A pytest (>=7.3.0,<8.0.0)
|
||||
:pypi:`pytest-memprof` Estimates memory consumption of test functions Mar 29, 2019 4 - Beta N/A
|
||||
:pypi:`pytest-memray` A simple plugin to use with pytest Dec 02, 2022 N/A pytest>=7.2
|
||||
:pypi:`pytest-memray` A simple plugin to use with pytest Jun 06, 2023 N/A pytest>=7.2
|
||||
:pypi:`pytest-menu` A pytest plugin for console based interactive test selection just after the collection phase Oct 04, 2017 3 - Alpha pytest (>=2.4.2)
|
||||
:pypi:`pytest-mercurial` pytest plugin to write integration tests for projects using Mercurial Python internals Nov 21, 2020 1 - Planning N/A
|
||||
:pypi:`pytest-mesh` pytest_mesh插件 Aug 05, 2022 N/A pytest (==7.1.2)
|
||||
|
@ -729,7 +733,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-mysql` MySQL process and client fixtures for pytest Mar 27, 2023 5 - Production/Stable pytest (>=6.2)
|
||||
:pypi:`pytest-needle` pytest plugin for visual testing websites using selenium Dec 10, 2018 4 - Beta pytest (<5.0.0,>=3.0.0)
|
||||
:pypi:`pytest-neo` pytest-neo is a plugin for pytest that shows tests like screen of Matrix. Jan 08, 2022 3 - Alpha pytest (>=6.2.0)
|
||||
:pypi:`pytest-netdut` "Automated software testing for switches using pytest" Apr 18, 2023 N/A pytest (>=3.5.0)
|
||||
:pypi:`pytest-netdut` "Automated software testing for switches using pytest" Jun 05, 2023 N/A pytest (>=3.5.0)
|
||||
:pypi:`pytest-network` A simple plugin to disable network on socket level. May 07, 2020 N/A N/A
|
||||
:pypi:`pytest-network-endpoints` Network endpoints plugin for pytest Mar 06, 2022 N/A pytest
|
||||
:pypi:`pytest-never-sleep` pytest plugin helps to avoid adding tests without mock \`time.sleep\` May 05, 2021 3 - Alpha pytest (>=3.5.1)
|
||||
|
@ -797,7 +801,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-pep257` py.test plugin for pep257 Jul 09, 2016 N/A N/A
|
||||
:pypi:`pytest-pep8` pytest plugin to check PEP8 requirements Apr 27, 2014 N/A N/A
|
||||
:pypi:`pytest-percent` Change the exit code of pytest test sessions when a required percent of tests pass. May 21, 2020 N/A pytest (>=5.2.0)
|
||||
:pypi:`pytest-perf` pytest-perf Jun 23, 2022 5 - Production/Stable pytest (>=6) ; extra == 'testing'
|
||||
:pypi:`pytest-perf` Run performance tests against the mainline code. Jun 02, 2023 5 - Production/Stable pytest (>=6) ; extra == 'testing'
|
||||
:pypi:`pytest-performance` A simple plugin to ensure the execution of critical sections of code has not been impacted Sep 11, 2020 5 - Production/Stable pytest (>=3.7.0)
|
||||
:pypi:`pytest-persistence` Pytest tool for persistent objects May 16, 2023 N/A N/A
|
||||
:pypi:`pytest-pg` A tiny plugin for pytest which runs PostgreSQL in Docker May 04, 2023 5 - Production/Stable pytest (>=6.0.0)
|
||||
|
@ -863,7 +867,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-pydocstyle` pytest plugin to run pydocstyle Jan 05, 2023 3 - Alpha N/A
|
||||
:pypi:`pytest-pylint` pytest plugin to check source code with pylint Sep 10, 2022 5 - Production/Stable pytest (>=5.4)
|
||||
:pypi:`pytest-pymysql-autorecord` Record PyMySQL queries and mock with the stored data. Sep 02, 2022 N/A N/A
|
||||
:pypi:`pytest-pyodide` "Pytest plugin for testing applications that use Pyodide" May 10, 2023 N/A pytest
|
||||
:pypi:`pytest-pyodide` "Pytest plugin for testing applications that use Pyodide" Jun 02, 2023 N/A pytest
|
||||
:pypi:`pytest-pypi` Easily test your HTTP library against a local copy of pypi Mar 04, 2018 3 - Alpha N/A
|
||||
:pypi:`pytest-pypom-navigation` Core engine for cookiecutter-qa and pytest-play packages Feb 18, 2019 4 - Beta pytest (>=3.0.7)
|
||||
:pypi:`pytest-pyppeteer` A plugin to run pyppeteer in pytest Apr 28, 2022 N/A pytest (>=6.2.5,<7.0.0)
|
||||
|
@ -881,7 +885,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-qaseio` Pytest plugin for Qase.io integration May 11, 2023 4 - Beta pytest (>=7.2.2,<8.0.0)
|
||||
:pypi:`pytest-qasync` Pytest support for qasync. Jul 12, 2021 4 - Beta pytest (>=5.4.0)
|
||||
:pypi:`pytest-qatouch` Pytest plugin for uploading test results to your QA Touch Testrun. Feb 14, 2023 4 - Beta pytest (>=6.2.0)
|
||||
:pypi:`pytest-qgis` A pytest plugin for testing QGIS python plugins Jun 26, 2022 5 - Production/Stable pytest (>=6.2.3)
|
||||
:pypi:`pytest-qgis` A pytest plugin for testing QGIS python plugins May 31, 2023 5 - Production/Stable pytest (>=6.2.5)
|
||||
:pypi:`pytest-qml` Run QML Tests with pytest Dec 02, 2020 4 - Beta pytest (>=6.0.0)
|
||||
:pypi:`pytest-qr` pytest plugin to generate test result QR codes Nov 25, 2021 4 - Beta N/A
|
||||
:pypi:`pytest-qt` pytest support for PyQt and PySide applications Oct 25, 2022 5 - Production/Stable pytest (>=3.0.0)
|
||||
|
@ -911,7 +915,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-redmine` Pytest plugin for redmine Mar 19, 2018 1 - Planning N/A
|
||||
:pypi:`pytest-ref` A plugin to store reference files to ease regression testing Nov 23, 2019 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-reference-formatter` Conveniently run pytest with a dot-formatted test reference. Oct 01, 2019 4 - Beta N/A
|
||||
:pypi:`pytest-regex` Select pytest tests with regular expressions May 23, 2023 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-regex` Select pytest tests with regular expressions May 29, 2023 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-regex-dependency` Management of Pytest dependencies via regex patterns Jun 12, 2022 N/A pytest
|
||||
:pypi:`pytest-regressions` Easy to use fixtures to write regression tests. Jan 13, 2023 5 - Production/Stable pytest (>=6.2.0)
|
||||
:pypi:`pytest-regtest` pytest plugin for regression tests Jul 08, 2022 N/A N/A
|
||||
|
@ -927,7 +931,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-repo-health` A pytest plugin to report on repository standards conformance Apr 17, 2023 3 - Alpha pytest
|
||||
:pypi:`pytest-report` Creates json report that is compatible with atom.io's linter message format May 11, 2016 4 - Beta N/A
|
||||
:pypi:`pytest-reporter` Generate Pytest reports with templates Jul 22, 2021 4 - Beta pytest
|
||||
:pypi:`pytest-reporter-html1` A basic HTML report template for Pytest Jun 08, 2021 4 - Beta N/A
|
||||
:pypi:`pytest-reporter-html1` A basic HTML report template for Pytest Jun 05, 2023 4 - Beta N/A
|
||||
:pypi:`pytest-reporter-html-dots` A basic HTML report for pytest using Jinja2 template engine. Jan 22, 2023 N/A N/A
|
||||
:pypi:`pytest-reportinfra` Pytest plugin for reportinfra Aug 11, 2019 3 - Alpha N/A
|
||||
:pypi:`pytest-reporting` A plugin to report summarized results in a table format Oct 25, 2019 4 - Beta pytest (>=3.5.0)
|
||||
|
@ -945,7 +949,7 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-rerunfailures` pytest plugin to re-run tests to eliminate flaky failures Mar 09, 2023 5 - Production/Stable pytest (>=5.3)
|
||||
:pypi:`pytest-rerunfailures-all-logs` pytest plugin to re-run tests to eliminate flaky failures Mar 07, 2022 5 - Production/Stable N/A
|
||||
:pypi:`pytest-reserial` Pytest fixture for recording and replaying serial port traffic. Apr 26, 2023 4 - Beta pytest
|
||||
:pypi:`pytest-resilient-circuits` Resilient Circuits fixtures for PyTest May 05, 2023 N/A pytest (~=4.6) ; python_version == "2.7"
|
||||
:pypi:`pytest-resilient-circuits` Resilient Circuits fixtures for PyTest Jun 01, 2023 N/A pytest (~=4.6) ; python_version == "2.7"
|
||||
:pypi:`pytest-resource` Load resource fixture plugin to use with pytest Nov 14, 2018 4 - Beta N/A
|
||||
:pypi:`pytest-resource-path` Provides path for uniform access to test resources in isolated directory May 01, 2021 5 - Production/Stable pytest (>=3.5.0)
|
||||
:pypi:`pytest-resource-usage` Pytest plugin for reporting running time and peak memory usage Nov 06, 2022 5 - Production/Stable pytest>=7.0.0
|
||||
|
@ -991,14 +995,14 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-sanic` a pytest plugin for Sanic Oct 25, 2021 N/A pytest (>=5.2)
|
||||
:pypi:`pytest-sanity` Dec 07, 2020 N/A N/A
|
||||
:pypi:`pytest-sa-pg` May 14, 2019 N/A N/A
|
||||
:pypi:`pytest-sbase` A complete web automation framework for end-to-end testing. May 25, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-sbase` A complete web automation framework for end-to-end testing. Jun 02, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-scenario` pytest plugin for test scenarios Feb 06, 2017 3 - Alpha N/A
|
||||
:pypi:`pytest-schedule` The job of test scheduling for humans. Jan 07, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-schema` 👍 Validate return values against a schema-like object in testing Mar 14, 2022 5 - Production/Stable pytest (>=3.5.0)
|
||||
:pypi:`pytest-securestore` An encrypted password store for use within pytest cases Nov 08, 2021 4 - Beta N/A
|
||||
:pypi:`pytest-select` A pytest plugin which allows to (de-)select tests from a file. Jan 18, 2019 3 - Alpha pytest (>=3.0)
|
||||
:pypi:`pytest-selenium` pytest plugin for Selenium Sep 21, 2022 5 - Production/Stable pytest (>=6.0.0,<7.0.0)
|
||||
:pypi:`pytest-seleniumbase` A complete web automation framework for end-to-end testing. May 25, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-selenium` pytest plugin for Selenium May 28, 2023 5 - Production/Stable pytest>=6.0.0
|
||||
:pypi:`pytest-seleniumbase` A complete web automation framework for end-to-end testing. Jun 02, 2023 5 - Production/Stable N/A
|
||||
:pypi:`pytest-selenium-enhancer` pytest plugin for Selenium Apr 29, 2022 5 - Production/Stable N/A
|
||||
:pypi:`pytest-selenium-pdiff` A pytest package implementing perceptualdiff for Selenium tests. Apr 06, 2017 2 - Pre-Alpha N/A
|
||||
:pypi:`pytest-send-email` Send pytest execution result email Dec 04, 2019 N/A N/A
|
||||
|
@ -1227,18 +1231,18 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-vscodedebug` A pytest plugin to easily enable debugging tests within Visual Studio Code Dec 04, 2020 4 - Beta N/A
|
||||
:pypi:`pytest-vscode-pycharm-cls` A PyTest helper to enable start remote debugger on test start or failure or when pytest.set_trace is used. Feb 01, 2023 N/A pytest
|
||||
:pypi:`pytest-vts` pytest plugin for automatic recording of http stubbed tests Jun 05, 2019 N/A pytest (>=2.3)
|
||||
:pypi:`pytest-vulture` A pytest plugin to checks dead code with vulture May 19, 2023 N/A pytest (>=7.0.0)
|
||||
:pypi:`pytest-vulture` A pytest plugin to checks dead code with vulture Jun 01, 2023 N/A pytest (>=7.0.0)
|
||||
:pypi:`pytest-vw` pytest-vw makes your failing test cases succeed under CI tools scrutiny Oct 07, 2015 4 - Beta N/A
|
||||
:pypi:`pytest-vyper` Plugin for the vyper smart contract language. May 28, 2020 2 - Pre-Alpha N/A
|
||||
:pypi:`pytest-wa-e2e-plugin` Pytest plugin for testing whatsapp bots with end to end tests Feb 18, 2020 4 - Beta pytest (>=3.5.0)
|
||||
:pypi:`pytest-wake` May 11, 2023 N/A pytest
|
||||
:pypi:`pytest-watch` Local continuous test runner with pytest and watchdog. May 20, 2018 N/A N/A
|
||||
:pypi:`pytest-watcher` Continiously runs pytest on changes in \*.py files Dec 11, 2022 3 - Alpha N/A
|
||||
:pypi:`pytest-watcher` Automatically rerun your tests on file modifications Jun 03, 2023 4 - Beta N/A
|
||||
:pypi:`pytest-wdl` Pytest plugin for testing WDL workflows. Nov 17, 2020 5 - Production/Stable N/A
|
||||
:pypi:`pytest-web3-data` Sep 15, 2022 4 - Beta pytest
|
||||
:pypi:`pytest-webdriver` Selenium webdriver fixture for py.test May 28, 2019 5 - Production/Stable pytest
|
||||
:pypi:`pytest-wetest` Welian API Automation test framework pytest plugin Nov 10, 2018 4 - Beta N/A
|
||||
:pypi:`pytest-when` Utility which makes mocking more readable and controllable May 22, 2023 N/A pytest>=7.3.1
|
||||
:pypi:`pytest-when` Utility which makes mocking more readable and controllable Jun 05, 2023 N/A pytest>=7.3.1
|
||||
:pypi:`pytest-whirlwind` Testing Tornado. Jun 12, 2020 N/A N/A
|
||||
:pypi:`pytest-wholenodeid` pytest addon for displaying the whole node id for failures Aug 26, 2015 4 - Beta pytest (>=2.0)
|
||||
:pypi:`pytest-win32consoletitle` Pytest progress in console title (Win32 only) Aug 08, 2021 N/A N/A
|
||||
|
@ -1260,12 +1264,12 @@ This list contains 1259 plugins.
|
|||
:pypi:`pytest-xrayjira` Mar 17, 2020 3 - Alpha pytest (==4.3.1)
|
||||
:pypi:`pytest-xray-server` May 03, 2022 3 - Alpha pytest (>=5.3.1)
|
||||
:pypi:`pytest-xskynet` A package to prevent Dependency Confusion attacks against Yandex. Feb 10, 2023 N/A N/A
|
||||
:pypi:`pytest-xvfb` A pytest plugin to run Xvfb for tests. Jun 09, 2020 4 - Beta pytest (>=2.8.1)
|
||||
:pypi:`pytest-xvfb` A pytest plugin to run Xvfb (or Xephyr/Xvnc) for tests. May 29, 2023 4 - Beta pytest (>=2.8.1)
|
||||
:pypi:`pytest-yaml` This plugin is used to load yaml output to your test using pytest framework. Oct 05, 2018 N/A pytest
|
||||
:pypi:`pytest-yaml-sanmu` pytest plugin for generating test cases by yaml Mar 17, 2023 N/A pytest>=7.2.0
|
||||
:pypi:`pytest-yaml-sanmu` pytest plugin for generating test cases by yaml May 28, 2023 N/A pytest>=7.2.0
|
||||
:pypi:`pytest-yamltree` Create or check file/directory trees described by YAML Mar 02, 2020 4 - Beta pytest (>=3.1.1)
|
||||
:pypi:`pytest-yamlwsgi` Run tests against wsgi apps defined in yaml May 11, 2010 N/A N/A
|
||||
:pypi:`pytest-yaml-yoyo` http/https API run by yaml May 22, 2023 N/A pytest (>=7.2.0)
|
||||
:pypi:`pytest-yaml-yoyo` http/https API run by yaml May 30, 2023 N/A pytest (>=7.2.0)
|
||||
:pypi:`pytest-yapf` Run yapf Jul 06, 2017 4 - Beta pytest (>=3.1.1)
|
||||
:pypi:`pytest-yapf3` Validate your Python file format with yapf Mar 29, 2023 5 - Production/Stable pytest (>=7)
|
||||
:pypi:`pytest-yield` PyTest plugin to run tests concurrently, each \`yield\` switch context to other one Jan 23, 2019 N/A N/A
|
||||
|
@ -1282,6 +1286,13 @@ This list contains 1259 plugins.
|
|||
.. only:: latex
|
||||
|
||||
|
||||
:pypi:`logassert`
|
||||
*last release*: May 20, 2022,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: N/A
|
||||
|
||||
Simple but powerful assertion and verification of logged lines.
|
||||
|
||||
:pypi:`pytest-abq`
|
||||
*last release*: Apr 07, 2023,
|
||||
*status*: N/A,
|
||||
|
@ -1738,7 +1749,7 @@ This list contains 1259 plugins.
|
|||
Pytest support for asyncio
|
||||
|
||||
:pypi:`pytest-asyncio-cooperative`
|
||||
*last release*: Feb 10, 2023,
|
||||
*last release*: May 31, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -2648,9 +2659,9 @@ This list contains 1259 plugins.
|
|||
Package stands for pytest plugin to upload results into Confluence page.
|
||||
|
||||
:pypi:`pytest-console-scripts`
|
||||
*last release*: May 22, 2023,
|
||||
*last release*: May 31, 2023,
|
||||
*status*: 4 - Beta,
|
||||
*requires*: N/A
|
||||
*requires*: pytest (>=4.0.0)
|
||||
|
||||
Pytest plugin for testing console scripts
|
||||
|
||||
|
@ -2753,7 +2764,7 @@ This list contains 1259 plugins.
|
|||
Use pytest's runner to discover and execute C++ tests
|
||||
|
||||
:pypi:`pytest-cppython`
|
||||
*last release*: May 25, 2023,
|
||||
*last release*: Jun 02, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -3032,6 +3043,13 @@ This list contains 1259 plugins.
|
|||
|
||||
|
||||
|
||||
:pypi:`pytest-dbt`
|
||||
*last release*: May 31, 2023,
|
||||
*status*: 2 - Pre-Alpha,
|
||||
*requires*: pytest (>=7.0.0,<8.0.0)
|
||||
|
||||
Unit test dbt models with standard python tooling
|
||||
|
||||
:pypi:`pytest-dbt-adapter`
|
||||
*last release*: Nov 24, 2021,
|
||||
*status*: N/A,
|
||||
|
@ -3285,7 +3303,7 @@ This list contains 1259 plugins.
|
|||
Cleanup your Haystack indexes between tests
|
||||
|
||||
:pypi:`pytest-django-ifactory`
|
||||
*last release*: May 21, 2023,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -3719,49 +3737,49 @@ This list contains 1259 plugins.
|
|||
Send execution result email
|
||||
|
||||
:pypi:`pytest-embedded`
|
||||
*last release*: Apr 11, 2023,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest (>=7.0)
|
||||
|
||||
pytest embedded plugin
|
||||
|
||||
:pypi:`pytest-embedded-arduino`
|
||||
*last release*: Apr 11, 2023,
|
||||
*status*: N/A,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: N/A
|
||||
|
||||
pytest embedded plugin for Arduino projects
|
||||
|
||||
:pypi:`pytest-embedded-idf`
|
||||
*last release*: Apr 11, 2023,
|
||||
*status*: N/A,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: N/A
|
||||
|
||||
pytest embedded plugin for esp-idf project
|
||||
|
||||
:pypi:`pytest-embedded-jtag`
|
||||
*last release*: Apr 11, 2023,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: N/A
|
||||
|
||||
pytest embedded plugin for testing with jtag
|
||||
|
||||
:pypi:`pytest-embedded-qemu`
|
||||
*last release*: Apr 11, 2023,
|
||||
*status*: N/A,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: N/A
|
||||
|
||||
pytest embedded plugin for qemu, not target chip
|
||||
|
||||
:pypi:`pytest-embedded-serial`
|
||||
*last release*: Apr 11, 2023,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: N/A
|
||||
|
||||
pytest embedded plugin for testing serial ports
|
||||
|
||||
:pypi:`pytest-embedded-serial-esp`
|
||||
*last release*: Apr 11, 2023,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -4559,7 +4577,7 @@ This list contains 1259 plugins.
|
|||
For finding/executing Ghost Inspector tests
|
||||
|
||||
:pypi:`pytest-girder`
|
||||
*last release*: May 22, 2023,
|
||||
*last release*: May 31, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -4783,7 +4801,7 @@ This list contains 1259 plugins.
|
|||
A pytest plugin for use with homeassistant custom components.
|
||||
|
||||
:pypi:`pytest-homeassistant-custom-component`
|
||||
*last release*: May 24, 2023,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: 3 - Alpha,
|
||||
*requires*: pytest (==7.3.1)
|
||||
|
||||
|
@ -4937,7 +4955,7 @@ This list contains 1259 plugins.
|
|||
pytest-httpserver is a httpserver for pytest
|
||||
|
||||
:pypi:`pytest-httptesting`
|
||||
*last release*: Apr 19, 2023,
|
||||
*last release*: Jun 03, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest (>=7.2.0,<8.0.0)
|
||||
|
||||
|
@ -5168,7 +5186,7 @@ This list contains 1259 plugins.
|
|||
Pytest plugin for checking charm relation interface protocol compliance.
|
||||
|
||||
:pypi:`pytest-invenio`
|
||||
*last release*: Apr 13, 2023,
|
||||
*last release*: Jun 02, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: pytest (<7.2.0,>=6)
|
||||
|
||||
|
@ -5280,7 +5298,7 @@ This list contains 1259 plugins.
|
|||
Plugin skips (xfail) tests if unresolved Jira issue(s) linked
|
||||
|
||||
:pypi:`pytest-jira-xray`
|
||||
*last release*: May 15, 2023,
|
||||
*last release*: May 29, 2023,
|
||||
*status*: 4 - Beta,
|
||||
*requires*: pytest
|
||||
|
||||
|
@ -5497,7 +5515,7 @@ This list contains 1259 plugins.
|
|||
It helps to use fixtures in pytest.mark.parametrize
|
||||
|
||||
:pypi:`pytest-lazy-fixtures`
|
||||
*last release*: Mar 11, 2023,
|
||||
*last release*: May 28, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest (>=7.2.1,<8.0.0)
|
||||
|
||||
|
@ -5700,7 +5718,7 @@ This list contains 1259 plugins.
|
|||
|
||||
|
||||
:pypi:`pytest-logikal`
|
||||
*last release*: May 27, 2023,
|
||||
*last release*: Jun 04, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: pytest (==7.3.1)
|
||||
|
||||
|
@ -5854,7 +5872,7 @@ This list contains 1259 plugins.
|
|||
Plugin for generating Markdown reports for pytest results
|
||||
|
||||
:pypi:`pytest-md-report`
|
||||
*last release*: Aug 06, 2022,
|
||||
*last release*: May 28, 2023,
|
||||
*status*: 4 - Beta,
|
||||
*requires*: pytest (!=6.0.0,<8,>=3.3.2)
|
||||
|
||||
|
@ -5875,7 +5893,7 @@ This list contains 1259 plugins.
|
|||
Estimates memory consumption of test functions
|
||||
|
||||
:pypi:`pytest-memray`
|
||||
*last release*: Dec 02, 2022,
|
||||
*last release*: Jun 06, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest>=7.2
|
||||
|
||||
|
@ -6260,7 +6278,7 @@ This list contains 1259 plugins.
|
|||
pytest-neo is a plugin for pytest that shows tests like screen of Matrix.
|
||||
|
||||
:pypi:`pytest-netdut`
|
||||
*last release*: Apr 18, 2023,
|
||||
*last release*: Jun 05, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest (>=3.5.0)
|
||||
|
||||
|
@ -6736,11 +6754,11 @@ This list contains 1259 plugins.
|
|||
Change the exit code of pytest test sessions when a required percent of tests pass.
|
||||
|
||||
:pypi:`pytest-perf`
|
||||
*last release*: Jun 23, 2022,
|
||||
*last release*: Jun 02, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: pytest (>=6) ; extra == 'testing'
|
||||
|
||||
pytest-perf
|
||||
Run performance tests against the mainline code.
|
||||
|
||||
:pypi:`pytest-performance`
|
||||
*last release*: Sep 11, 2020,
|
||||
|
@ -7198,7 +7216,7 @@ This list contains 1259 plugins.
|
|||
Record PyMySQL queries and mock with the stored data.
|
||||
|
||||
:pypi:`pytest-pyodide`
|
||||
*last release*: May 10, 2023,
|
||||
*last release*: Jun 02, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest
|
||||
|
||||
|
@ -7324,9 +7342,9 @@ This list contains 1259 plugins.
|
|||
Pytest plugin for uploading test results to your QA Touch Testrun.
|
||||
|
||||
:pypi:`pytest-qgis`
|
||||
*last release*: Jun 26, 2022,
|
||||
*last release*: May 31, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: pytest (>=6.2.3)
|
||||
*requires*: pytest (>=6.2.5)
|
||||
|
||||
A pytest plugin for testing QGIS python plugins
|
||||
|
||||
|
@ -7534,7 +7552,7 @@ This list contains 1259 plugins.
|
|||
Conveniently run pytest with a dot-formatted test reference.
|
||||
|
||||
:pypi:`pytest-regex`
|
||||
*last release*: May 23, 2023,
|
||||
*last release*: May 29, 2023,
|
||||
*status*: 4 - Beta,
|
||||
*requires*: pytest (>=3.5.0)
|
||||
|
||||
|
@ -7646,7 +7664,7 @@ This list contains 1259 plugins.
|
|||
Generate Pytest reports with templates
|
||||
|
||||
:pypi:`pytest-reporter-html1`
|
||||
*last release*: Jun 08, 2021,
|
||||
*last release*: Jun 05, 2023,
|
||||
*status*: 4 - Beta,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -7772,7 +7790,7 @@ This list contains 1259 plugins.
|
|||
Pytest fixture for recording and replaying serial port traffic.
|
||||
|
||||
:pypi:`pytest-resilient-circuits`
|
||||
*last release*: May 05, 2023,
|
||||
*last release*: Jun 01, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest (~=4.6) ; python_version == "2.7"
|
||||
|
||||
|
@ -8094,7 +8112,7 @@ This list contains 1259 plugins.
|
|||
|
||||
|
||||
:pypi:`pytest-sbase`
|
||||
*last release*: May 25, 2023,
|
||||
*last release*: Jun 02, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -8136,14 +8154,14 @@ This list contains 1259 plugins.
|
|||
A pytest plugin which allows to (de-)select tests from a file.
|
||||
|
||||
:pypi:`pytest-selenium`
|
||||
*last release*: Sep 21, 2022,
|
||||
*last release*: May 28, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: pytest (>=6.0.0,<7.0.0)
|
||||
*requires*: pytest>=6.0.0
|
||||
|
||||
pytest plugin for Selenium
|
||||
|
||||
:pypi:`pytest-seleniumbase`
|
||||
*last release*: May 25, 2023,
|
||||
*last release*: Jun 02, 2023,
|
||||
*status*: 5 - Production/Stable,
|
||||
*requires*: N/A
|
||||
|
||||
|
@ -9746,7 +9764,7 @@ This list contains 1259 plugins.
|
|||
pytest plugin for automatic recording of http stubbed tests
|
||||
|
||||
:pypi:`pytest-vulture`
|
||||
*last release*: May 19, 2023,
|
||||
*last release*: Jun 01, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest (>=7.0.0)
|
||||
|
||||
|
@ -9788,11 +9806,11 @@ This list contains 1259 plugins.
|
|||
Local continuous test runner with pytest and watchdog.
|
||||
|
||||
:pypi:`pytest-watcher`
|
||||
*last release*: Dec 11, 2022,
|
||||
*status*: 3 - Alpha,
|
||||
*last release*: Jun 03, 2023,
|
||||
*status*: 4 - Beta,
|
||||
*requires*: N/A
|
||||
|
||||
Continiously runs pytest on changes in \*.py files
|
||||
Automatically rerun your tests on file modifications
|
||||
|
||||
:pypi:`pytest-wdl`
|
||||
*last release*: Nov 17, 2020,
|
||||
|
@ -9823,7 +9841,7 @@ This list contains 1259 plugins.
|
|||
Welian API Automation test framework pytest plugin
|
||||
|
||||
:pypi:`pytest-when`
|
||||
*last release*: May 22, 2023,
|
||||
*last release*: Jun 05, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest>=7.3.1
|
||||
|
||||
|
@ -9977,11 +9995,11 @@ This list contains 1259 plugins.
|
|||
A package to prevent Dependency Confusion attacks against Yandex.
|
||||
|
||||
:pypi:`pytest-xvfb`
|
||||
*last release*: Jun 09, 2020,
|
||||
*last release*: May 29, 2023,
|
||||
*status*: 4 - Beta,
|
||||
*requires*: pytest (>=2.8.1)
|
||||
|
||||
A pytest plugin to run Xvfb for tests.
|
||||
A pytest plugin to run Xvfb (or Xephyr/Xvnc) for tests.
|
||||
|
||||
:pypi:`pytest-yaml`
|
||||
*last release*: Oct 05, 2018,
|
||||
|
@ -9991,7 +10009,7 @@ This list contains 1259 plugins.
|
|||
This plugin is used to load yaml output to your test using pytest framework.
|
||||
|
||||
:pypi:`pytest-yaml-sanmu`
|
||||
*last release*: Mar 17, 2023,
|
||||
*last release*: May 28, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest>=7.2.0
|
||||
|
||||
|
@ -10012,7 +10030,7 @@ This list contains 1259 plugins.
|
|||
Run tests against wsgi apps defined in yaml
|
||||
|
||||
:pypi:`pytest-yaml-yoyo`
|
||||
*last release*: May 22, 2023,
|
||||
*last release*: May 30, 2023,
|
||||
*status*: N/A,
|
||||
*requires*: pytest (>=7.2.0)
|
||||
|
||||
|
|
|
@ -17,7 +17,9 @@ Plugin List
|
|||
===========
|
||||
|
||||
PyPI projects that match "pytest-\*" are considered plugins and are listed
|
||||
automatically. Packages classified as inactive are excluded.
|
||||
automatically together with a manually-maintained list in `the source
|
||||
code <https://github.com/pytest-dev/pytest/blob/main/scripts/update-plugin-list.py>`_.
|
||||
Packages classified as inactive are excluded.
|
||||
|
||||
.. The following conditional uses a different format for this list when
|
||||
creating a PDF, because otherwise the table gets far too wide for the
|
||||
|
@ -33,6 +35,9 @@ DEVELOPMENT_STATUS_CLASSIFIERS = (
|
|||
"Development Status :: 6 - Mature",
|
||||
"Development Status :: 7 - Inactive",
|
||||
)
|
||||
ADDITIONAL_PROJECTS = { # set of additional projects to consider as plugins
|
||||
"logassert",
|
||||
}
|
||||
|
||||
|
||||
def escape_rst(text: str) -> str:
|
||||
|
@ -52,18 +57,18 @@ def iter_plugins():
|
|||
regex = r">([\d\w-]*)</a>"
|
||||
response = requests.get("https://pypi.org/simple")
|
||||
|
||||
matches = list(
|
||||
match
|
||||
for match in re.finditer(regex, response.text)
|
||||
if match.groups()[0].startswith("pytest-")
|
||||
)
|
||||
match_names = (match.groups()[0] for match in re.finditer(regex, response.text))
|
||||
plugin_names = [
|
||||
name
|
||||
for name in match_names
|
||||
if name.startswith("pytest-") or name in ADDITIONAL_PROJECTS
|
||||
]
|
||||
|
||||
for match in tqdm(matches, smoothing=0):
|
||||
name = match.groups()[0]
|
||||
for name in tqdm(plugin_names, smoothing=0):
|
||||
response = requests.get(f"https://pypi.org/pypi/{name}/json")
|
||||
if response.status_code == 404:
|
||||
# Some packages, like pytest-azurepipelines42, are included in https://pypi.org/simple but
|
||||
# return 404 on the JSON API. Skip.
|
||||
# Some packages, like pytest-azurepipelines42, are included in https://pypi.org/simple
|
||||
# but return 404 on the JSON API. Skip.
|
||||
continue
|
||||
response.raise_for_status()
|
||||
info = response.json()["info"]
|
||||
|
|
|
@ -6,7 +6,7 @@ long_description_content_type = text/x-rst
|
|||
url = https://docs.pytest.org/en/latest/
|
||||
author = Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
|
||||
license = MIT
|
||||
license_file = LICENSE
|
||||
license_files = LICENSE
|
||||
platforms = unix, linux, osx, cygwin, win32
|
||||
classifiers =
|
||||
Development Status :: 6 - Mature
|
||||
|
@ -22,6 +22,7 @@ classifiers =
|
|||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: 3.11
|
||||
Programming Language :: Python :: 3.12
|
||||
Topic :: Software Development :: Libraries
|
||||
Topic :: Software Development :: Testing
|
||||
Topic :: Utilities
|
||||
|
@ -73,6 +74,7 @@ testing =
|
|||
nose
|
||||
pygments>=2.7.2
|
||||
requests
|
||||
setuptools
|
||||
xmlschema
|
||||
|
||||
[options.package_data]
|
||||
|
|
|
@ -46,8 +46,14 @@ if TYPE_CHECKING:
|
|||
|
||||
if sys.version_info >= (3, 8):
|
||||
namedExpr = ast.NamedExpr
|
||||
astNameConstant = ast.Constant
|
||||
astStr = ast.Constant
|
||||
astNum = ast.Constant
|
||||
else:
|
||||
namedExpr = ast.Expr
|
||||
astNameConstant = ast.NameConstant
|
||||
astStr = ast.Str
|
||||
astNum = ast.Num
|
||||
|
||||
|
||||
assertstate_key = StashKey["AssertionState"]()
|
||||
|
@ -680,9 +686,12 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
if (
|
||||
expect_docstring
|
||||
and isinstance(item, ast.Expr)
|
||||
and isinstance(item.value, ast.Str)
|
||||
and isinstance(item.value, astStr)
|
||||
):
|
||||
doc = item.value.s
|
||||
if sys.version_info >= (3, 8):
|
||||
doc = item.value.value
|
||||
else:
|
||||
doc = item.value.s
|
||||
if self.is_rewrite_disabled(doc):
|
||||
return
|
||||
expect_docstring = False
|
||||
|
@ -814,7 +823,7 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
current = self.stack.pop()
|
||||
if self.stack:
|
||||
self.explanation_specifiers = self.stack[-1]
|
||||
keys = [ast.Str(key) for key in current.keys()]
|
||||
keys = [astStr(key) for key in current.keys()]
|
||||
format_dict = ast.Dict(keys, list(current.values()))
|
||||
form = ast.BinOp(expl_expr, ast.Mod(), format_dict)
|
||||
name = "@py_format" + str(next(self.variable_counter))
|
||||
|
@ -868,16 +877,16 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
negation = ast.UnaryOp(ast.Not(), top_condition)
|
||||
|
||||
if self.enable_assertion_pass_hook: # Experimental pytest_assertion_pass hook
|
||||
msg = self.pop_format_context(ast.Str(explanation))
|
||||
msg = self.pop_format_context(astStr(explanation))
|
||||
|
||||
# Failed
|
||||
if assert_.msg:
|
||||
assertmsg = self.helper("_format_assertmsg", assert_.msg)
|
||||
gluestr = "\n>assert "
|
||||
else:
|
||||
assertmsg = ast.Str("")
|
||||
assertmsg = astStr("")
|
||||
gluestr = "assert "
|
||||
err_explanation = ast.BinOp(ast.Str(gluestr), ast.Add(), msg)
|
||||
err_explanation = ast.BinOp(astStr(gluestr), ast.Add(), msg)
|
||||
err_msg = ast.BinOp(assertmsg, ast.Add(), err_explanation)
|
||||
err_name = ast.Name("AssertionError", ast.Load())
|
||||
fmt = self.helper("_format_explanation", err_msg)
|
||||
|
@ -893,8 +902,8 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
hook_call_pass = ast.Expr(
|
||||
self.helper(
|
||||
"_call_assertion_pass",
|
||||
ast.Num(assert_.lineno),
|
||||
ast.Str(orig),
|
||||
astNum(assert_.lineno),
|
||||
astStr(orig),
|
||||
fmt_pass,
|
||||
)
|
||||
)
|
||||
|
@ -913,7 +922,7 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
variables = [
|
||||
ast.Name(name, ast.Store()) for name in self.format_variables
|
||||
]
|
||||
clear_format = ast.Assign(variables, ast.NameConstant(None))
|
||||
clear_format = ast.Assign(variables, astNameConstant(None))
|
||||
self.statements.append(clear_format)
|
||||
|
||||
else: # Original assertion rewriting
|
||||
|
@ -924,9 +933,9 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
assertmsg = self.helper("_format_assertmsg", assert_.msg)
|
||||
explanation = "\n>assert " + explanation
|
||||
else:
|
||||
assertmsg = ast.Str("")
|
||||
assertmsg = astStr("")
|
||||
explanation = "assert " + explanation
|
||||
template = ast.BinOp(assertmsg, ast.Add(), ast.Str(explanation))
|
||||
template = ast.BinOp(assertmsg, ast.Add(), astStr(explanation))
|
||||
msg = self.pop_format_context(template)
|
||||
fmt = self.helper("_format_explanation", msg)
|
||||
err_name = ast.Name("AssertionError", ast.Load())
|
||||
|
@ -938,7 +947,7 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
# Clear temporary variables by setting them to None.
|
||||
if self.variables:
|
||||
variables = [ast.Name(name, ast.Store()) for name in self.variables]
|
||||
clear = ast.Assign(variables, ast.NameConstant(None))
|
||||
clear = ast.Assign(variables, astNameConstant(None))
|
||||
self.statements.append(clear)
|
||||
# Fix locations (line numbers/column offsets).
|
||||
for stmt in self.statements:
|
||||
|
@ -952,20 +961,20 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
# thinks it's acceptable.
|
||||
locs = ast.Call(self.builtin("locals"), [], [])
|
||||
target_id = name.target.id # type: ignore[attr-defined]
|
||||
inlocs = ast.Compare(ast.Str(target_id), [ast.In()], [locs])
|
||||
inlocs = ast.Compare(astStr(target_id), [ast.In()], [locs])
|
||||
dorepr = self.helper("_should_repr_global_name", name)
|
||||
test = ast.BoolOp(ast.Or(), [inlocs, dorepr])
|
||||
expr = ast.IfExp(test, self.display(name), ast.Str(target_id))
|
||||
expr = ast.IfExp(test, self.display(name), astStr(target_id))
|
||||
return name, self.explanation_param(expr)
|
||||
|
||||
def visit_Name(self, name: ast.Name) -> Tuple[ast.Name, str]:
|
||||
# Display the repr of the name if it's a local variable or
|
||||
# _should_repr_global_name() thinks it's acceptable.
|
||||
locs = ast.Call(self.builtin("locals"), [], [])
|
||||
inlocs = ast.Compare(ast.Str(name.id), [ast.In()], [locs])
|
||||
inlocs = ast.Compare(astStr(name.id), [ast.In()], [locs])
|
||||
dorepr = self.helper("_should_repr_global_name", name)
|
||||
test = ast.BoolOp(ast.Or(), [inlocs, dorepr])
|
||||
expr = ast.IfExp(test, self.display(name), ast.Str(name.id))
|
||||
expr = ast.IfExp(test, self.display(name), astStr(name.id))
|
||||
return name, self.explanation_param(expr)
|
||||
|
||||
def visit_BoolOp(self, boolop: ast.BoolOp) -> Tuple[ast.Name, str]:
|
||||
|
@ -1003,7 +1012,7 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
self.push_format_context()
|
||||
res, expl = self.visit(v)
|
||||
body.append(ast.Assign([ast.Name(res_var, ast.Store())], res))
|
||||
expl_format = self.pop_format_context(ast.Str(expl))
|
||||
expl_format = self.pop_format_context(astStr(expl))
|
||||
call = ast.Call(app, [expl_format], [])
|
||||
self.expl_stmts.append(ast.Expr(call))
|
||||
if i < levels:
|
||||
|
@ -1015,7 +1024,7 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
self.statements = body = inner
|
||||
self.statements = save
|
||||
self.expl_stmts = fail_save
|
||||
expl_template = self.helper("_format_boolop", expl_list, ast.Num(is_or))
|
||||
expl_template = self.helper("_format_boolop", expl_list, astNum(is_or))
|
||||
expl = self.pop_format_context(expl_template)
|
||||
return ast.Name(res_var, ast.Load()), self.explanation_param(expl)
|
||||
|
||||
|
@ -1118,9 +1127,9 @@ class AssertionRewriter(ast.NodeVisitor):
|
|||
next_expl = f"({next_expl})"
|
||||
results.append(next_res)
|
||||
sym = BINOP_MAP[op.__class__]
|
||||
syms.append(ast.Str(sym))
|
||||
syms.append(astStr(sym))
|
||||
expl = f"{left_expl} {sym} {next_expl}"
|
||||
expls.append(ast.Str(expl))
|
||||
expls.append(astStr(expl))
|
||||
res_expr = ast.Compare(left_res, [op], [next_res])
|
||||
self.statements.append(ast.Assign([store_names[i]], res_expr))
|
||||
left_res, left_expl = next_res, next_expl
|
||||
|
|
|
@ -27,7 +27,7 @@ from _pytest.deprecated import check_ispytest
|
|||
from _pytest.fixtures import fixture
|
||||
from _pytest.fixtures import FixtureRequest
|
||||
from _pytest.main import Session
|
||||
from _pytest.python import Module
|
||||
from _pytest.nodes import File
|
||||
from _pytest.python import Package
|
||||
from _pytest.reports import TestReport
|
||||
|
||||
|
@ -242,7 +242,7 @@ class LFPluginCollWrapper:
|
|||
)
|
||||
return
|
||||
|
||||
elif isinstance(collector, Module):
|
||||
elif isinstance(collector, File):
|
||||
if collector.path in self.lfplugin._last_failed_paths:
|
||||
out = yield
|
||||
res = out.get_result()
|
||||
|
@ -280,9 +280,9 @@ class LFPluginCollSkipfiles:
|
|||
def pytest_make_collect_report(
|
||||
self, collector: nodes.Collector
|
||||
) -> Optional[CollectReport]:
|
||||
# Packages are Modules, but we only want to skip test-bearing Modules,
|
||||
# Packages are Files, but we only want to skip test-bearing Files,
|
||||
# so don't filter Packages.
|
||||
if isinstance(collector, Module) and not isinstance(collector, Package):
|
||||
if isinstance(collector, File) and not isinstance(collector, Package):
|
||||
if collector.path not in self.lfplugin._last_failed_paths:
|
||||
self.lfplugin._skipped_files += 1
|
||||
|
||||
|
|
|
@ -400,6 +400,12 @@ def pytest_ignore_collect(collection_path: Path, config: Config) -> Optional[boo
|
|||
allow_in_venv = config.getoption("collect_in_virtualenv")
|
||||
if not allow_in_venv and _in_venv(collection_path):
|
||||
return True
|
||||
|
||||
if collection_path.is_dir():
|
||||
norecursepatterns = config.getini("norecursedirs")
|
||||
if any(fnmatch_ex(pat, collection_path) for pat in norecursepatterns):
|
||||
return True
|
||||
|
||||
return None
|
||||
|
||||
|
||||
|
@ -563,9 +569,6 @@ class Session(nodes.FSCollector):
|
|||
ihook = self.gethookproxy(fspath.parent)
|
||||
if ihook.pytest_ignore_collect(collection_path=fspath, config=self.config):
|
||||
return False
|
||||
norecursepatterns = self.config.getini("norecursedirs")
|
||||
if any(fnmatch_ex(pat, fspath) for pat in norecursepatterns):
|
||||
return False
|
||||
return True
|
||||
|
||||
def _collectfile(
|
||||
|
@ -686,8 +689,8 @@ class Session(nodes.FSCollector):
|
|||
# are not collected more than once.
|
||||
matchnodes_cache: Dict[Tuple[Type[nodes.Collector], str], CollectReport] = {}
|
||||
|
||||
# Dirnames of pkgs with dunder-init files.
|
||||
pkg_roots: Dict[str, Package] = {}
|
||||
# Directories of pkgs with dunder-init files.
|
||||
pkg_roots: Dict[Path, Package] = {}
|
||||
|
||||
for argpath, names in self._initial_parts:
|
||||
self.trace("processing argument", (argpath, names))
|
||||
|
@ -708,7 +711,7 @@ class Session(nodes.FSCollector):
|
|||
col = self._collectfile(pkginit, handle_dupes=False)
|
||||
if col:
|
||||
if isinstance(col[0], Package):
|
||||
pkg_roots[str(parent)] = col[0]
|
||||
pkg_roots[parent] = col[0]
|
||||
node_cache1[col[0].path] = [col[0]]
|
||||
|
||||
# If it's a directory argument, recurse and look for any Subpackages.
|
||||
|
@ -717,7 +720,7 @@ class Session(nodes.FSCollector):
|
|||
assert not names, f"invalid arg {(argpath, names)!r}"
|
||||
|
||||
seen_dirs: Set[Path] = set()
|
||||
for direntry in visit(str(argpath), self._recurse):
|
||||
for direntry in visit(argpath, self._recurse):
|
||||
if not direntry.is_file():
|
||||
continue
|
||||
|
||||
|
@ -732,8 +735,8 @@ class Session(nodes.FSCollector):
|
|||
for x in self._collectfile(pkginit):
|
||||
yield x
|
||||
if isinstance(x, Package):
|
||||
pkg_roots[str(dirpath)] = x
|
||||
if str(dirpath) in pkg_roots:
|
||||
pkg_roots[dirpath] = x
|
||||
if dirpath in pkg_roots:
|
||||
# Do not collect packages here.
|
||||
continue
|
||||
|
||||
|
@ -750,7 +753,7 @@ class Session(nodes.FSCollector):
|
|||
if argpath in node_cache1:
|
||||
col = node_cache1[argpath]
|
||||
else:
|
||||
collect_root = pkg_roots.get(str(argpath.parent), self)
|
||||
collect_root = pkg_roots.get(argpath.parent, self)
|
||||
col = collect_root._collectfile(argpath, handle_dupes=False)
|
||||
if col:
|
||||
node_cache1[argpath] = col
|
||||
|
|
|
@ -18,6 +18,7 @@ import ast
|
|||
import dataclasses
|
||||
import enum
|
||||
import re
|
||||
import sys
|
||||
import types
|
||||
from typing import Callable
|
||||
from typing import Iterator
|
||||
|
@ -26,6 +27,11 @@ from typing import NoReturn
|
|||
from typing import Optional
|
||||
from typing import Sequence
|
||||
|
||||
if sys.version_info >= (3, 8):
|
||||
astNameConstant = ast.Constant
|
||||
else:
|
||||
astNameConstant = ast.NameConstant
|
||||
|
||||
|
||||
__all__ = [
|
||||
"Expression",
|
||||
|
@ -132,7 +138,7 @@ IDENT_PREFIX = "$"
|
|||
|
||||
def expression(s: Scanner) -> ast.Expression:
|
||||
if s.accept(TokenType.EOF):
|
||||
ret: ast.expr = ast.NameConstant(False)
|
||||
ret: ast.expr = astNameConstant(False)
|
||||
else:
|
||||
ret = expr(s)
|
||||
s.accept(TokenType.EOF, reject=True)
|
||||
|
|
|
@ -706,9 +706,6 @@ class Package(Module):
|
|||
ihook = self.session.gethookproxy(fspath.parent)
|
||||
if ihook.pytest_ignore_collect(collection_path=fspath, config=self.config):
|
||||
return False
|
||||
norecursepatterns = self.config.getini("norecursedirs")
|
||||
if any(fnmatch_ex(pat, fspath) for pat in norecursepatterns):
|
||||
return False
|
||||
return True
|
||||
|
||||
def _collectfile(
|
||||
|
|
|
@ -105,7 +105,7 @@ def tw_mock():
|
|||
|
||||
|
||||
@pytest.fixture
|
||||
def dummy_yaml_custom_test(pytester: Pytester):
|
||||
def dummy_yaml_custom_test(pytester: Pytester) -> None:
|
||||
"""Writes a conftest file that collects and executes a dummy yaml test.
|
||||
|
||||
Taken from the docs, but stripped down to the bare minimum, useful for
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
anyio[curio,trio]==3.7.0
|
||||
django==4.2.1
|
||||
django==4.2.2
|
||||
pytest-asyncio==0.21.0
|
||||
pytest-bdd==6.1.1
|
||||
pytest-cov==4.1.0
|
||||
|
@ -12,4 +12,4 @@ pytest-sugar==0.9.7
|
|||
pytest-trio==0.7.0
|
||||
pytest-twisted==1.14.0
|
||||
twisted==22.8.0
|
||||
pytest-xvfb==2.0.0
|
||||
pytest-xvfb==3.0.0
|
||||
|
|
|
@ -897,25 +897,29 @@ class TestConftestCustomization:
|
|||
def test_issue2369_collect_module_fileext(self, pytester: Pytester) -> None:
|
||||
"""Ensure we can collect files with weird file extensions as Python
|
||||
modules (#2369)"""
|
||||
# We'll implement a little finder and loader to import files containing
|
||||
# Implement a little meta path finder to import files containing
|
||||
# Python source code whose file extension is ".narf".
|
||||
pytester.makeconftest(
|
||||
"""
|
||||
import sys, os, imp
|
||||
import sys
|
||||
import os.path
|
||||
from importlib.util import spec_from_loader
|
||||
from importlib.machinery import SourceFileLoader
|
||||
from _pytest.python import Module
|
||||
|
||||
class Loader(object):
|
||||
def load_module(self, name):
|
||||
return imp.load_source(name, name + ".narf")
|
||||
class Finder(object):
|
||||
def find_module(self, name, path=None):
|
||||
if os.path.exists(name + ".narf"):
|
||||
return Loader()
|
||||
sys.meta_path.append(Finder())
|
||||
class MetaPathFinder:
|
||||
def find_spec(self, fullname, path, target=None):
|
||||
if os.path.exists(fullname + ".narf"):
|
||||
return spec_from_loader(
|
||||
fullname,
|
||||
SourceFileLoader(fullname, fullname + ".narf"),
|
||||
)
|
||||
sys.meta_path.append(MetaPathFinder())
|
||||
|
||||
def pytest_collect_file(file_path, parent):
|
||||
if file_path.suffix == ".narf":
|
||||
return Module.from_parent(path=file_path, parent=parent)"""
|
||||
return Module.from_parent(path=file_path, parent=parent)
|
||||
"""
|
||||
)
|
||||
pytester.makefile(
|
||||
".narf",
|
||||
|
|
|
@ -1085,6 +1085,28 @@ class TestLastFailed:
|
|||
result = pytester.runpytest("--lf")
|
||||
result.assert_outcomes(failed=3)
|
||||
|
||||
def test_non_python_file_skipped(
|
||||
self,
|
||||
pytester: Pytester,
|
||||
dummy_yaml_custom_test: None,
|
||||
) -> None:
|
||||
pytester.makepyfile(
|
||||
**{
|
||||
"test_bad.py": """def test_bad(): assert False""",
|
||||
},
|
||||
)
|
||||
result = pytester.runpytest()
|
||||
result.stdout.fnmatch_lines(["collected 2 items", "* 1 failed, 1 passed in *"])
|
||||
|
||||
result = pytester.runpytest("--lf")
|
||||
result.stdout.fnmatch_lines(
|
||||
[
|
||||
"collected 1 item",
|
||||
"run-last-failure: rerun previous 1 failure (skipped 1 file)",
|
||||
"* 1 failed in *",
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
class TestNewFirst:
|
||||
def test_newfirst_usecase(self, pytester: Pytester) -> None:
|
||||
|
|
Loading…
Reference in New Issue