Merge branch 'whitespace/dev' of github.com:HSamiul/cakepop-pytest into whitespace/dev

This commit is contained in:
Maddie Thai-Tang 2023-05-06 16:45:24 -04:00
commit f083d5c50d
14 changed files with 184 additions and 71 deletions

View File

@ -23,7 +23,7 @@ repos:
exclude: _pytest/(debugging|hookspec).py
language_version: python3
- repo: https://github.com/PyCQA/autoflake
rev: v2.1.0
rev: v2.1.1
hooks:
- id: autoflake
name: autoflake
@ -44,7 +44,7 @@ repos:
- id: reorder-python-imports
args: ['--application-directories=.:src', --py37-plus]
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
rev: v3.3.2
hooks:
- id: pyupgrade
args: [--py37-plus]

View File

@ -56,6 +56,7 @@ Benjamin Peterson
Bernard Pratz
Bob Ippolito
Brian Dorsey
Brian Larsen
Brian Maissy
Brian Okken
Brianna Laugher

View File

@ -0,0 +1,3 @@
Improved verbose output (``-vv``) of ``skip`` and ``xfail`` reasons by performing text wrapping while leaving a clear margin for progress output.
Added :func:`TerminalReporter.wrap_write() <pytest.TerminalReporter.wrap_write>` as a helper for that.

View File

@ -294,3 +294,20 @@ See also `pypa/setuptools#1684 <https://github.com/pypa/setuptools/issues/1684>`
setuptools intends to
`remove the test command <https://github.com/pypa/setuptools/issues/931>`_.
Checking with flake8-pytest-style
---------------------------------
In order to ensure that pytest is being used correctly in your project,
it can be helpful to use the `flake8-pytest-style <https://github.com/m-burst/flake8-pytest-style>`_ flake8 plugin.
flake8-pytest-style checks for common mistakes and coding style violations in pytest code,
such as incorrect use of fixtures, test function names, and markers.
By using this plugin, you can catch these errors early in the development process
and ensure that your pytest code is consistent and easy to maintain.
A list of the lints detected by flake8-pytest-style can be found on its `PyPI page <https://pypi.org/project/flake8-pytest-style/>`_.
.. note::
flake8-pytest-style is not an official pytest project. Some of the rules enforce certain style choices, such as using `@pytest.fixture()` over `@pytest.fixture`, but you can configure the plugin to fit your preferred style.

View File

@ -1,11 +1,10 @@
:orphan:
..
.. sidebar:: Next Open Trainings
.. sidebar:: Next Open Trainings
- `Professional Testing with Python <https://python-academy.com/courses/python_course_testing.html>`_, via `Python Academy <https://www.python-academy.com/>`_, March 7th to 9th 2023 (3 day in-depth training), Remote
- `Professional Testing with Python <https://python-academy.com/courses/python_course_testing.html>`_, via `Python Academy <https://www.python-academy.com/>`_, March 5th to 7th 2024 (3 day in-depth training), Leipzig/Remote
Also see :doc:`previous talks and blogposts <talks>`.
Also see :doc:`previous talks and blogposts <talks>`.
.. _features:

View File

@ -11,7 +11,7 @@ automatically. Packages classified as inactive are excluded.
creating a PDF, because otherwise the table gets far too wide for the
page.
This list contains 1239 plugins.
This list contains 1247 plugins.
.. only:: not latex
@ -37,7 +37,7 @@ This list contains 1239 plugins.
:pypi:`pytest-aioworkers` A plugin to test aioworkers project with pytest Dec 04, 2019 4 - Beta pytest (>=3.5.0)
:pypi:`pytest-airflow` pytest support for airflow. Apr 03, 2019 3 - Alpha pytest (>=4.4.0)
:pypi:`pytest-airflow-utils` Nov 15, 2021 N/A N/A
:pypi:`pytest-alembic` A pytest plugin for verifying alembic migrations. Apr 06, 2023 N/A pytest (>=6.0)
:pypi:`pytest-alembic` A pytest plugin for verifying alembic migrations. Apr 18, 2023 N/A pytest (>=6.0)
:pypi:`pytest-allclose` Pytest fixture extending Numpy's allclose function Jul 30, 2019 5 - Production/Stable pytest
:pypi:`pytest-allure-adaptor` Plugin for py.test to generate allure xml reports Jan 10, 2018 N/A pytest (>=2.7.3)
:pypi:`pytest-allure-adaptor2` Plugin for py.test to generate allure xml reports Oct 14, 2020 N/A pytest (>=2.7.3)
@ -227,7 +227,7 @@ This list contains 1239 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 Mar 20, 2023 N/A N/A
:pypi:`pytest-cppython` A pytest plugin that imports CPPython testing types Apr 20, 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)
@ -457,7 +457,7 @@ This list contains 1239 plugins.
:pypi:`pytest-flakes` pytest plugin to check source code with pyflakes Dec 02, 2021 5 - Production/Stable pytest (>=5)
:pypi:`pytest-flaptastic` Flaptastic py.test plugin Mar 17, 2019 N/A N/A
:pypi:`pytest-flask` A set of py.test fixtures to test Flask applications. Feb 27, 2021 5 - Production/Stable pytest (>=5.2)
:pypi:`pytest-flask-ligand` Pytest fixtures and helper functions to use for testing flask-ligand microservices. Feb 10, 2023 4 - Beta pytest (~=7.2)
:pypi:`pytest-flask-ligand` Pytest fixtures and helper functions to use for testing flask-ligand microservices. Apr 25, 2023 4 - Beta pytest (~=7.3)
:pypi:`pytest-flask-sqlalchemy` A pytest plugin for preserving test isolation in Flask-SQlAlchemy using database transactions. Apr 30, 2022 4 - Beta pytest (>=3.2.1)
:pypi:`pytest-flask-sqlalchemy-transactions` Run tests in transactions using pytest, Flask, and SQLalchemy. Aug 02, 2018 4 - Beta pytest (>=3.2.1)
:pypi:`pytest-flexreport` Apr 15, 2023 4 - Beta pytest
@ -468,7 +468,7 @@ This list contains 1239 plugins.
:pypi:`pytest-forcefail` py.test plugin to make the test failing regardless of pytest.mark.xfail May 15, 2018 4 - Beta N/A
:pypi:`pytest-forward-compatability` A name to avoid typosquating pytest-foward-compatibility Sep 06, 2020 N/A N/A
:pypi:`pytest-forward-compatibility` A pytest plugin to shim pytest commandline options for fowards compatibility Sep 29, 2020 N/A N/A
:pypi:`pytest-frappe` Pytest Frappe Plugin - A set of pytest fixtures to test Frappe applications Apr 14, 2023 4 - Beta pytest>=7.0.0
:pypi:`pytest-frappe` Pytest Frappe Plugin - A set of pytest fixtures to test Frappe applications Apr 17, 2023 4 - Beta pytest>=7.0.0
:pypi:`pytest-freezegun` Wrap tests with fixtures in freeze_time Jul 19, 2020 4 - Beta pytest (>=3.0.0)
:pypi:`pytest-freezer` Pytest plugin providing a fixture interface for spulec/freezegun Oct 20, 2022 N/A pytest>=3.6
:pypi:`pytest-freeze-reqs` Check if requirement files are frozen Apr 29, 2021 N/A N/A
@ -517,9 +517,10 @@ This list contains 1239 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 Apr 14, 2023 3 - Alpha pytest (==7.2.2)
:pypi:`pytest-homeassistant-custom-component` Experimental package to automatically extract test plugins for Home Assistant custom components Apr 22, 2023 3 - Alpha pytest (==7.2.2)
: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` A pytest plugin to enable a hot reloading daemon. Apr 23, 2023 N/A N/A
:pypi:`pytest-hot-test` A plugin that tracks test changes Dec 10, 2022 4 - Beta pytest (>=3.5.0)
:pypi:`pytest-hoverfly` Simplify working with Hoverfly from pytest Jan 30, 2023 N/A pytest (>=5.0)
:pypi:`pytest-hoverfly-wrapper` Integrates the Hoverfly HTTP proxy into Pytest Feb 27, 2023 5 - Production/Stable pytest (>=3.7.0)
@ -537,7 +538,7 @@ This list contains 1239 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 Sep 12, 2022 3 - Alpha N/A
:pypi:`pytest-httptesting` http_testing framework on top of pytest Mar 15, 2023 N/A pytest (>=7.2.0,<8.0.0)
:pypi:`pytest-httptesting` http_testing framework on top of pytest Apr 19, 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
@ -595,7 +596,7 @@ This list contains 1239 plugins.
:pypi:`pytest-json-report` A pytest plugin to report test results as JSON files Mar 15, 2022 4 - Beta pytest (>=3.8.0)
:pypi:`pytest-jtr` pytest plugin supporting json test report output Nov 29, 2022 N/A pytest (>=7.1.2,<8.0.0)
:pypi:`pytest-jupyter` A pytest plugin for testing Jupyter libraries and extensions. Mar 30, 2023 4 - Beta pytest
:pypi:`pytest-jupyterhub` A reusable JupyterHub pytest plugin Apr 13, 2023 5 - Production/Stable pytest
:pypi:`pytest-jupyterhub` A reusable JupyterHub pytest plugin Apr 25, 2023 5 - Production/Stable pytest
:pypi:`pytest-kafka` Zookeeper, Kafka server, and Kafka consumer fixtures for Pytest Oct 01, 2022 N/A pytest
:pypi:`pytest-kafkavents` A plugin to send pytest events to Kafka Sep 08, 2021 4 - Beta pytest
:pypi:`pytest-kasima` Display horizontal lines above and below the captured standard output for easy viewing. Jan 26, 2023 5 - Production/Stable pytest (>=7.2.1,<8.0.0)
@ -663,6 +664,7 @@ This list contains 1239 plugins.
:pypi:`pytest-match-skip` Skip matching marks. Matches partial marks using wildcards. May 15, 2019 4 - Beta pytest (>=4.4.1)
:pypi:`pytest-mat-report` this is report Jan 20, 2021 N/A N/A
:pypi:`pytest-matrix` Provide tools for generating tests from combinations of fixtures. Jun 24, 2020 5 - Production/Stable pytest (>=5.4.3,<6.0.0)
:pypi:`pytest-maybe-context` Simplify tests with warning and exception cases. Apr 16, 2023 N/A pytest (>=7,<8)
: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)
@ -676,7 +678,7 @@ This list contains 1239 plugins.
:pypi:`pytest-messenger` Pytest to Slack reporting plugin Nov 24, 2022 5 - Production/Stable N/A
:pypi:`pytest-metadata` pytest plugin for test session metadata Oct 30, 2022 5 - Production/Stable pytest (>=3.0.0,<8.0.0)
:pypi:`pytest-metrics` Custom metrics report for pytest Apr 04, 2020 N/A pytest
:pypi:`pytest-mh` Pytest multihost plugin Apr 06, 2023 N/A pytest
:pypi:`pytest-mh` Pytest multihost plugin Apr 19, 2023 N/A pytest
:pypi:`pytest-mimesis` Mimesis integration with the pytest test runner Mar 21, 2020 5 - Production/Stable pytest (>=4.2)
:pypi:`pytest-minecraft` A pytest plugin for running tests against Minecraft releases Apr 06, 2022 N/A pytest (>=6.0.1)
:pypi:`pytest-mini` A plugin to test mp Feb 06, 2023 N/A pytest (>=7.2.0,<8.0.0)
@ -723,7 +725,7 @@ This list contains 1239 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 11, 2023 N/A pytest (>=3.5.0)
:pypi:`pytest-netdut` "Automated software testing for switches using pytest" Apr 18, 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)
@ -751,7 +753,7 @@ This list contains 1239 plugins.
:pypi:`pytest-odoo-fixtures` Project description Jun 25, 2019 N/A N/A
:pypi:`pytest-oerp` pytest plugin to test OpenERP modules Feb 28, 2012 3 - Alpha N/A
:pypi:`pytest-offline` Mar 09, 2023 1 - Planning pytest (>=7.0.0,<8.0.0)
:pypi:`pytest-ogsm-plugin` 针对特定项目定制化插件优化了pytest报告展示方式,并添加了项目所需特定参数 Apr 03, 2023 N/A N/A
:pypi:`pytest-ogsm-plugin` 针对特定项目定制化插件优化了pytest报告展示方式,并添加了项目所需特定参数 Apr 24, 2023 N/A N/A
:pypi:`pytest-ok` The ultimate pytest output plugin Apr 01, 2019 4 - Beta N/A
:pypi:`pytest-only` Use @pytest.mark.only to run a single test Jun 14, 2022 5 - Production/Stable pytest (<7.1); python_version <= "3.6"
:pypi:`pytest-oot` Run object-oriented tests in a simple format Sep 18, 2016 4 - Beta N/A
@ -784,6 +786,7 @@ This list contains 1239 plugins.
:pypi:`pytest-pass` Check out https://github.com/elilutsky/pytest-pass Dec 04, 2019 N/A N/A
:pypi:`pytest-passrunner` Pytest plugin providing the 'run_on_pass' marker Feb 10, 2021 5 - Production/Stable pytest (>=4.6.0)
:pypi:`pytest-paste-config` Allow setting the path to a paste config file Sep 18, 2013 3 - Alpha N/A
:pypi:`pytest-patch` An automagic \`patch\` fixture that can patch objects directly or by name. Apr 29, 2023 3 - Alpha pytest (>=7.0.0)
:pypi:`pytest-patches` A contextmanager pytest fixture for handling multiple mock patches Aug 30, 2021 4 - Beta pytest (>=3.5.0)
:pypi:`pytest-pdb` pytest plugin which adds pdb helper commands related to pytest. Jul 31, 2018 N/A N/A
:pypi:`pytest-peach` pytest plugin for fuzzing with Peach API Security Apr 12, 2019 4 - Beta pytest (>=2.8.7)
@ -808,7 +811,7 @@ This list contains 1239 plugins.
:pypi:`pytest-platform-markers` Markers for pytest to skip tests on specific platforms Sep 09, 2019 4 - Beta pytest (>=3.6.0)
:pypi:`pytest-play` pytest plugin that let you automate actions and assertions with test metrics reporting executing plain YAML files Jun 12, 2019 5 - Production/Stable N/A
:pypi:`pytest-playbook` Pytest plugin for reading playbooks. Jan 21, 2021 3 - Alpha pytest (>=6.1.2,<7.0.0)
:pypi:`pytest-playwright` A pytest wrapper with fixtures for Playwright to automate web browsers Mar 10, 2023 N/A pytest (<8.0.0,>=6.2.4)
:pypi:`pytest-playwright` A pytest wrapper with fixtures for Playwright to automate web browsers Apr 24, 2023 N/A pytest (<8.0.0,>=6.2.4)
:pypi:`pytest-playwrights` A pytest wrapper with fixtures for Playwright to automate web browsers Dec 02, 2021 N/A N/A
:pypi:`pytest-playwright-snapshot` A pytest wrapper for snapshot testing with playwright Aug 19, 2021 N/A N/A
:pypi:`pytest-playwright-visual` A pytest fixture for visual testing with Playwright Apr 28, 2022 N/A N/A
@ -896,7 +899,7 @@ This list contains 1239 plugins.
:pypi:`pytest-recorder` Pytest plugin, meant to facilitate unit tests writing for tools consumming Web APIs. Mar 30, 2023 N/A N/A
:pypi:`pytest-recording` A pytest plugin that allows you recording of network interactions via VCR.py Feb 16, 2023 4 - Beta pytest (>=3.5.0)
:pypi:`pytest-recordings` Provides pytest plugins for reporting request/response traffic, screenshots, and more to ReportPortal Aug 13, 2020 N/A N/A
:pypi:`pytest-redis` Redis fixtures and fixture factories for Pytest. Mar 27, 2023 5 - Production/Stable pytest (>=6.2)
:pypi:`pytest-redis` Redis fixtures and fixture factories for Pytest. Apr 19, 2023 5 - Production/Stable pytest (>=6.2)
:pypi:`pytest-redislite` Pytest plugin for testing code using Redis Apr 05, 2022 4 - Beta pytest
: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)
@ -908,22 +911,22 @@ This list contains 1239 plugins.
:pypi:`pytest-relaxed` Relaxed test discovery/organization for pytest Dec 31, 2022 5 - Production/Stable pytest (>=7)
:pypi:`pytest-remfiles` Pytest plugin to create a temporary directory with remote files Jul 01, 2019 5 - Production/Stable N/A
:pypi:`pytest-remotedata` Pytest plugin for controlling remote data access. Dec 12, 2022 3 - Alpha pytest (>=4.6)
:pypi:`pytest-remote-response` Pytest plugin for capturing and mocking connection requests. Mar 27, 2023 4 - Beta pytest (>=4.6)
:pypi:`pytest-remote-response` Pytest plugin for capturing and mocking connection requests. Apr 26, 2023 5 - Production/Stable pytest (>=4.6)
:pypi:`pytest-remove-stale-bytecode` py.test plugin to remove stale byte code files. Mar 04, 2020 4 - Beta pytest
:pypi:`pytest-reorder` Reorder tests depending on their paths and names. May 31, 2018 4 - Beta pytest
:pypi:`pytest-repeat` pytest plugin for repeating tests Oct 31, 2020 5 - Production/Stable pytest (>=3.6)
:pypi:`pytest-replay` Saves previous test runs and allow re-execute previous pytest runs to reproduce crashes or flaky tests Jun 09, 2021 4 - Beta pytest (>=3.0.0)
:pypi:`pytest-repo-health` A pytest plugin to report on repository standards conformance Dec 16, 2021 3 - Alpha pytest
: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-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)
:pypi:`pytest-reportlog` Replacement for the --resultlog option, focused in simplicity and extensibility Mar 11, 2023 3 - Alpha pytest
:pypi:`pytest-reportlog` Replacement for the --resultlog option, focused in simplicity and extensibility Apr 26, 2023 3 - Alpha pytest
:pypi:`pytest-report-me` A pytest plugin to generate report. Dec 31, 2020 N/A pytest
:pypi:`pytest-report-parameters` pytest plugin for adding tests' parameters to junit report Jun 18, 2020 3 - Alpha pytest (>=2.4.2)
:pypi:`pytest-reportportal` Agent for Reporting results of tests to the Report Portal Mar 28, 2023 N/A pytest (>=3.8.0)
:pypi:`pytest-reportportal` Agent for Reporting results of tests to the Report Portal Apr 21, 2023 N/A pytest (>=3.8.0)
:pypi:`pytest-reqs` pytest plugin to check pinned requirements May 12, 2019 N/A pytest (>=2.4.2)
:pypi:`pytest-requests` A simple plugin to use with pytest Jun 24, 2019 4 - Beta pytest (>=3.5.0)
:pypi:`pytest-requestselapsed` collect and show http requests elapsed time Aug 14, 2022 N/A N/A
@ -933,8 +936,8 @@ This list contains 1239 plugins.
:pypi:`pytest-rerun` Re-run only changed files in specified branch Jul 08, 2019 N/A pytest (>=3.6)
: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. Nov 29, 2022 4 - Beta pytest
:pypi:`pytest-resilient-circuits` Resilient Circuits fixtures for PyTest Feb 28, 2023 N/A pytest (~=4.6) ; python_version == "2.7"
: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 Apr 20, 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
@ -942,10 +945,13 @@ This list contains 1239 plugins.
:pypi:`pytest-responses` py.test integration for responses Oct 11, 2022 N/A pytest (>=2.5)
:pypi:`pytest-rest-api` Aug 08, 2022 N/A pytest (>=7.1.2,<8.0.0)
:pypi:`pytest-restrict` Pytest plugin to restrict the test types allowed May 11, 2022 5 - Production/Stable pytest
:pypi:`pytest-result-log` Write the execution result of the case to the log Feb 02, 2023 N/A pytest>=7.2.0
:pypi:`pytest-result-log` Write the execution result of the case to the log Apr 17, 2023 N/A pytest>=7.2.0
:pypi:`pytest-result-sender` Apr 20, 2023 N/A pytest>=7.3.1
:pypi:`pytest-resume` A Pytest plugin to resuming from the last run test Apr 22, 2023 4 - Beta pytest (>=7.0)
:pypi:`pytest-rethinkdb` A RethinkDB plugin for pytest. Jul 24, 2016 4 - Beta N/A
:pypi:`pytest-retry` Adds the ability to retry flaky tests in CI environments Aug 16, 2022 N/A pytest (>=7.0.0)
:pypi:`pytest-retry-class` A pytest plugin to rerun entire class on failure Mar 25, 2023 N/A pytest (>=5.3)
:pypi:`pytest-reusable-testcases` Apr 28, 2023 N/A N/A
:pypi:`pytest-reverse` Pytest plugin to reverse test order. May 11, 2022 5 - Production/Stable pytest
:pypi:`pytest-rich` Leverage rich for richer test session output Mar 03, 2022 4 - Beta pytest (>=7.0)
:pypi:`pytest-rich-reporter` A pytest plugin using Rich for beautiful test result formatting. Feb 17, 2022 1 - Planning pytest (>=5.0.0)
@ -960,7 +966,7 @@ This list contains 1239 plugins.
:pypi:`pytest-rst` Test code from RST documents with pytest Jan 26, 2023 N/A N/A
:pypi:`pytest-rt` pytest data collector plugin for Testgr May 05, 2022 N/A N/A
:pypi:`pytest-rts` Coverage-based regression test selection (RTS) plugin for pytest May 17, 2021 N/A pytest
:pypi:`pytest-ruff` pytest plugin to check ruff requirements. Mar 22, 2023 4 - Beta N/A
:pypi:`pytest-ruff` pytest plugin to check ruff requirements. Apr 28, 2023 4 - Beta N/A
:pypi:`pytest-run-changed` Pytest plugin that runs changed tests only Apr 02, 2021 3 - Alpha pytest
:pypi:`pytest-runfailed` implement a --failed option for pytest Mar 24, 2016 N/A N/A
:pypi:`pytest-runner` Invoke py.test as distutils command with dependency resolution Feb 25, 2022 5 - Production/Stable pytest (>=6) ; extra == 'testing'
@ -977,14 +983,14 @@ This list contains 1239 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. Apr 15, 2023 5 - Production/Stable N/A
:pypi:`pytest-sbase` A complete web automation framework for end-to-end testing. Apr 29, 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. Apr 15, 2023 5 - Production/Stable N/A
:pypi:`pytest-seleniumbase` A complete web automation framework for end-to-end testing. Apr 29, 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
@ -1055,6 +1061,7 @@ This list contains 1239 plugins.
:pypi:`pytest-sqitch` sqitch for pytest Apr 06, 2020 4 - Beta N/A
:pypi:`pytest-sqlalchemy` pytest plugin with sqlalchemy related fixtures Mar 13, 2018 3 - Alpha N/A
:pypi:`pytest-sqlalchemy-mock` pytest sqlalchemy plugin for mock Mar 15, 2023 3 - Alpha pytest (>=2.0)
:pypi:`pytest-sqlalchemy-session` A pytest plugin for preserving test isolation that use SQLAlchemy. Apr 29, 2023 4 - Beta pytest (>=7.0)
:pypi:`pytest-sql-bigquery` Yet another SQL-testing framework for BigQuery provided by pytest plugin Dec 19, 2019 N/A pytest
:pypi:`pytest-sqlfluff` A pytest plugin to use sqlfluff to enable format checking of sql files. Dec 21, 2022 4 - Beta pytest (>=3.5.0)
:pypi:`pytest-squadcast` Pytest report plugin for Squadcast Feb 22, 2022 5 - Production/Stable pytest
@ -1079,6 +1086,7 @@ This list contains 1239 plugins.
:pypi:`pytest-subtests` unittest subTest() support and subtests fixture Feb 16, 2023 4 - Beta pytest (>=7.0)
:pypi:`pytest-subunit` pytest-subunit is a plugin for py.test which outputs testsresult in subunit format. Aug 29, 2017 N/A N/A
:pypi:`pytest-sugar` pytest-sugar is a plugin for pytest that changes the default look and feel of pytest (e.g. progressbar, show tests that fail instantly). Apr 10, 2023 4 - Beta pytest (>=6.2.0)
:pypi:`pytest-suitemanager` A simple plugin to use with pytest Apr 28, 2023 4 - Beta N/A
:pypi:`pytest-svn` SVN repository fixture for py.test May 28, 2019 5 - Production/Stable pytest
:pypi:`pytest-symbols` pytest-symbols is a pytest plugin that adds support for passing test environment symbols into pytest tests. Nov 20, 2017 3 - Alpha N/A
:pypi:`pytest-system-statistics` Pytest plugin to track and report system usage statistics Feb 16, 2022 5 - Production/Stable pytest (>=6.0.0)
@ -1148,7 +1156,7 @@ This list contains 1239 plugins.
:pypi:`pytest-tmp-files` Utilities to create temporary file hierarchies in pytest. Apr 03, 2022 N/A pytest
:pypi:`pytest-tmpfs` A pytest plugin that helps you on using a temporary filesystem for testing. Aug 29, 2022 N/A pytest
:pypi:`pytest-tmreport` this is a vue-element ui report for pytest Aug 12, 2022 N/A N/A
:pypi:`pytest-tmux` A pytest plugin that enables tmux driven tests Feb 15, 2023 4 - Beta N/A
:pypi:`pytest-tmux` A pytest plugin that enables tmux driven tests Apr 22, 2023 4 - Beta N/A
:pypi:`pytest-todo` A small plugin for the pytest testing framework, marking TODO comments as failure May 23, 2019 4 - Beta pytest
:pypi:`pytest-tomato` Mar 01, 2019 5 - Production/Stable N/A
:pypi:`pytest-toolbelt` This is just a collection of utilities for pytest, but don't really belong in pytest proper. Aug 12, 2019 3 - Alpha N/A
@ -1396,7 +1404,7 @@ This list contains 1239 plugins.
:pypi:`pytest-alembic`
*last release*: Apr 06, 2023,
*last release*: Apr 18, 2023,
*status*: N/A,
*requires*: pytest (>=6.0)
@ -2726,7 +2734,7 @@ This list contains 1239 plugins.
Use pytest's runner to discover and execute C++ tests
:pypi:`pytest-cppython`
*last release*: Mar 20, 2023,
*last release*: Apr 20, 2023,
*status*: N/A,
*requires*: N/A
@ -4336,9 +4344,9 @@ This list contains 1239 plugins.
A set of py.test fixtures to test Flask applications.
:pypi:`pytest-flask-ligand`
*last release*: Feb 10, 2023,
*last release*: Apr 25, 2023,
*status*: 4 - Beta,
*requires*: pytest (~=7.2)
*requires*: pytest (~=7.3)
Pytest fixtures and helper functions to use for testing flask-ligand microservices.
@ -4413,7 +4421,7 @@ This list contains 1239 plugins.
A pytest plugin to shim pytest commandline options for fowards compatibility
:pypi:`pytest-frappe`
*last release*: Apr 14, 2023,
*last release*: Apr 17, 2023,
*status*: 4 - Beta,
*requires*: pytest>=7.0.0
@ -4756,7 +4764,7 @@ This list contains 1239 plugins.
A pytest plugin for use with homeassistant custom components.
:pypi:`pytest-homeassistant-custom-component`
*last release*: Apr 14, 2023,
*last release*: Apr 22, 2023,
*status*: 3 - Alpha,
*requires*: pytest (==7.2.2)
@ -4776,6 +4784,13 @@ This list contains 1239 plugins.
Report on tests that honor constraints, and guard against regressions
:pypi:`pytest-hot-reloading`
*last release*: Apr 23, 2023,
*status*: N/A,
*requires*: N/A
A pytest plugin to enable a hot reloading daemon.
:pypi:`pytest-hot-test`
*last release*: Dec 10, 2022,
*status*: 4 - Beta,
@ -4896,7 +4911,7 @@ This list contains 1239 plugins.
pytest-httpserver is a httpserver for pytest
:pypi:`pytest-httptesting`
*last release*: Mar 15, 2023,
*last release*: Apr 19, 2023,
*status*: N/A,
*requires*: pytest (>=7.2.0,<8.0.0)
@ -5302,7 +5317,7 @@ This list contains 1239 plugins.
A pytest plugin for testing Jupyter libraries and extensions.
:pypi:`pytest-jupyterhub`
*last release*: Apr 13, 2023,
*last release*: Apr 25, 2023,
*status*: 5 - Production/Stable,
*requires*: pytest
@ -5777,6 +5792,13 @@ This list contains 1239 plugins.
Provide tools for generating tests from combinations of fixtures.
:pypi:`pytest-maybe-context`
*last release*: Apr 16, 2023,
*status*: N/A,
*requires*: pytest (>=7,<8)
Simplify tests with warning and exception cases.
:pypi:`pytest-maybe-raises`
*last release*: May 27, 2022,
*status*: N/A,
@ -5869,7 +5891,7 @@ This list contains 1239 plugins.
Custom metrics report for pytest
:pypi:`pytest-mh`
*last release*: Apr 06, 2023,
*last release*: Apr 19, 2023,
*status*: N/A,
*requires*: pytest
@ -6198,7 +6220,7 @@ This list contains 1239 plugins.
pytest-neo is a plugin for pytest that shows tests like screen of Matrix.
:pypi:`pytest-netdut`
*last release*: Apr 11, 2023,
*last release*: Apr 18, 2023,
*status*: N/A,
*requires*: pytest (>=3.5.0)
@ -6394,7 +6416,7 @@ This list contains 1239 plugins.
:pypi:`pytest-ogsm-plugin`
*last release*: Apr 03, 2023,
*last release*: Apr 24, 2023,
*status*: N/A,
*requires*: N/A
@ -6624,6 +6646,13 @@ This list contains 1239 plugins.
Allow setting the path to a paste config file
:pypi:`pytest-patch`
*last release*: Apr 29, 2023,
*status*: 3 - Alpha,
*requires*: pytest (>=7.0.0)
An automagic \`patch\` fixture that can patch objects directly or by name.
:pypi:`pytest-patches`
*last release*: Aug 30, 2021,
*status*: 4 - Beta,
@ -6793,7 +6822,7 @@ This list contains 1239 plugins.
Pytest plugin for reading playbooks.
:pypi:`pytest-playwright`
*last release*: Mar 10, 2023,
*last release*: Apr 24, 2023,
*status*: N/A,
*requires*: pytest (<8.0.0,>=6.2.4)
@ -7409,7 +7438,7 @@ This list contains 1239 plugins.
Provides pytest plugins for reporting request/response traffic, screenshots, and more to ReportPortal
:pypi:`pytest-redis`
*last release*: Mar 27, 2023,
*last release*: Apr 19, 2023,
*status*: 5 - Production/Stable,
*requires*: pytest (>=6.2)
@ -7493,8 +7522,8 @@ This list contains 1239 plugins.
Pytest plugin for controlling remote data access.
:pypi:`pytest-remote-response`
*last release*: Mar 27, 2023,
*status*: 4 - Beta,
*last release*: Apr 26, 2023,
*status*: 5 - Production/Stable,
*requires*: pytest (>=4.6)
Pytest plugin for capturing and mocking connection requests.
@ -7528,7 +7557,7 @@ This list contains 1239 plugins.
Saves previous test runs and allow re-execute previous pytest runs to reproduce crashes or flaky tests
:pypi:`pytest-repo-health`
*last release*: Dec 16, 2021,
*last release*: Apr 17, 2023,
*status*: 3 - Alpha,
*requires*: pytest
@ -7577,7 +7606,7 @@ This list contains 1239 plugins.
A plugin to report summarized results in a table format
:pypi:`pytest-reportlog`
*last release*: Mar 11, 2023,
*last release*: Apr 26, 2023,
*status*: 3 - Alpha,
*requires*: pytest
@ -7598,7 +7627,7 @@ This list contains 1239 plugins.
pytest plugin for adding tests' parameters to junit report
:pypi:`pytest-reportportal`
*last release*: Mar 28, 2023,
*last release*: Apr 21, 2023,
*status*: N/A,
*requires*: pytest (>=3.8.0)
@ -7668,14 +7697,14 @@ This list contains 1239 plugins.
pytest plugin to re-run tests to eliminate flaky failures
:pypi:`pytest-reserial`
*last release*: Nov 29, 2022,
*last release*: Apr 26, 2023,
*status*: 4 - Beta,
*requires*: pytest
Pytest fixture for recording and replaying serial port traffic.
:pypi:`pytest-resilient-circuits`
*last release*: Feb 28, 2023,
*last release*: Apr 20, 2023,
*status*: N/A,
*requires*: pytest (~=4.6) ; python_version == "2.7"
@ -7731,12 +7760,26 @@ This list contains 1239 plugins.
Pytest plugin to restrict the test types allowed
:pypi:`pytest-result-log`
*last release*: Feb 02, 2023,
*last release*: Apr 17, 2023,
*status*: N/A,
*requires*: pytest>=7.2.0
Write the execution result of the case to the log
:pypi:`pytest-result-sender`
*last release*: Apr 20, 2023,
*status*: N/A,
*requires*: pytest>=7.3.1
:pypi:`pytest-resume`
*last release*: Apr 22, 2023,
*status*: 4 - Beta,
*requires*: pytest (>=7.0)
A Pytest plugin to resuming from the last run test
:pypi:`pytest-rethinkdb`
*last release*: Jul 24, 2016,
*status*: 4 - Beta,
@ -7758,6 +7801,13 @@ This list contains 1239 plugins.
A pytest plugin to rerun entire class on failure
:pypi:`pytest-reusable-testcases`
*last release*: Apr 28, 2023,
*status*: N/A,
*requires*: N/A
:pypi:`pytest-reverse`
*last release*: May 11, 2022,
*status*: 5 - Production/Stable,
@ -7857,7 +7907,7 @@ This list contains 1239 plugins.
Coverage-based regression test selection (RTS) plugin for pytest
:pypi:`pytest-ruff`
*last release*: Mar 22, 2023,
*last release*: Apr 28, 2023,
*status*: 4 - Beta,
*requires*: N/A
@ -7976,7 +8026,7 @@ This list contains 1239 plugins.
:pypi:`pytest-sbase`
*last release*: Apr 15, 2023,
*last release*: Apr 29, 2023,
*status*: 5 - Production/Stable,
*requires*: N/A
@ -8025,7 +8075,7 @@ This list contains 1239 plugins.
pytest plugin for Selenium
:pypi:`pytest-seleniumbase`
*last release*: Apr 15, 2023,
*last release*: Apr 29, 2023,
*status*: 5 - Production/Stable,
*requires*: N/A
@ -8521,6 +8571,13 @@ This list contains 1239 plugins.
pytest sqlalchemy plugin for mock
:pypi:`pytest-sqlalchemy-session`
*last release*: Apr 29, 2023,
*status*: 4 - Beta,
*requires*: pytest (>=7.0)
A pytest plugin for preserving test isolation that use SQLAlchemy.
:pypi:`pytest-sql-bigquery`
*last release*: Dec 19, 2019,
*status*: N/A,
@ -8689,6 +8746,13 @@ This list contains 1239 plugins.
pytest-sugar is a plugin for pytest that changes the default look and feel of pytest (e.g. progressbar, show tests that fail instantly).
:pypi:`pytest-suitemanager`
*last release*: Apr 28, 2023,
*status*: 4 - Beta,
*requires*: N/A
A simple plugin to use with pytest
:pypi:`pytest-svn`
*last release*: May 28, 2019,
*status*: 5 - Production/Stable,
@ -9173,7 +9237,7 @@ This list contains 1239 plugins.
this is a vue-element ui report for pytest
:pypi:`pytest-tmux`
*last release*: Feb 15, 2023,
*last release*: Apr 22, 2023,
*status*: 4 - Beta,
*requires*: N/A

View File

@ -1996,7 +1996,7 @@ All the command-line flags can be obtained by running ``pytest --help``::
Auto-indent multiline messages passed to the logging
module. Accepts true|on, false|off or an integer.
--log-disable=LOGGER_DISABLE
Disable a logger by name. Can be passed multipe
Disable a logger by name. Can be passed multiple
times.
[pytest] ini-options in the first pytest.ini|tox.ini|setup.cfg|pyproject.toml file found:

View File

@ -953,7 +953,7 @@ class LocalPath:
else:
p.dirpath()._ensuredirs()
if not p.check(file=1):
p.open("w").close()
p.open("wb").close()
return p
@overload

View File

@ -27,7 +27,9 @@ def pytest_configure(config: Config) -> None:
import faulthandler
stderr_fd_copy = os.dup(get_stderr_fileno())
config.stash[fault_handler_stderr_key] = open(stderr_fd_copy, "w")
config.stash[fault_handler_stderr_key] = open(
stderr_fd_copy, "w", encoding=sys.stderr.encoding
)
config.stash[fault_handler_originally_enabled_key] = faulthandler.is_enabled()
faulthandler.enable(file=config.stash[fault_handler_stderr_key])

View File

@ -302,7 +302,7 @@ def pytest_addoption(parser: Parser) -> None:
action="append",
default=[],
dest="logger_disable",
help="Disable a logger by name. Can be passed multipe times.",
help="Disable a logger by name. Can be passed multiple times.",
)

View File

@ -8,6 +8,7 @@ import datetime
import inspect
import platform
import sys
import textwrap
import warnings
from collections import Counter
from functools import partial
@ -426,6 +427,28 @@ class TerminalReporter:
self._tw.line()
self.currentfspath = None
def wrap_write(
self,
content: str,
*,
flush: bool = False,
margin: int = 8,
line_sep: str = "\n",
**markup: bool,
) -> None:
"""Wrap message with margin for progress info."""
width_of_current_line = self._tw.width_of_current_line
wrapped = line_sep.join(
textwrap.wrap(
" " * width_of_current_line + content,
width=self._screen_width - margin,
drop_whitespace=True,
replace_whitespace=False,
),
)
wrapped = wrapped[width_of_current_line:]
self._tw.write(wrapped, flush=flush, **markup)
def write(self, content: str, *, flush: bool = False, **markup: bool) -> None:
self._tw.write(content, flush=flush, **markup)
@ -572,7 +595,7 @@ class TerminalReporter:
formatted_reason = f" ({reason})"
if reason and formatted_reason is not None:
self._tw.write(formatted_reason)
self.wrap_write(formatted_reason)
if self._show_progress_info:
self._write_progress_information_filling_space()
else:

View File

@ -695,11 +695,15 @@ class TestInvocationVariants:
monkeypatch.chdir("world")
# pgk_resources.declare_namespace has been deprecated in favor of implicit namespace packages.
# pgk_resources has been deprecated entirely.
# While we could change the test to use implicit namespace packages, seems better
# to still ensure the old declaration via declare_namespace still works.
ignore_w = r"-Wignore:Deprecated call to `pkg_resources.declare_namespace"
ignore_w = (
r"-Wignore:Deprecated call to `pkg_resources.declare_namespace",
r"-Wignore:pkg_resources is deprecated",
)
result = pytester.runpytest(
"--pyargs", "-v", "ns_pkg.hello", "ns_pkg/world", ignore_w
"--pyargs", "-v", "ns_pkg.hello", "ns_pkg/world", *ignore_w
)
assert result.ret == 0
result.stdout.fnmatch_lines(

View File

@ -425,9 +425,7 @@ def test_context_classmethod() -> None:
assert A.x == 1
@pytest.mark.filterwarnings(
"ignore:Deprecated call to `pkg_resources.declare_namespace"
)
@pytest.mark.filterwarnings(r"ignore:.*\bpkg_resources\b:DeprecationWarning")
def test_syspath_prepend_with_namespace_packages(
pytester: Pytester, monkeypatch: MonkeyPatch
) -> None:

View File

@ -387,13 +387,13 @@ class TestTerminal:
pytest.xfail("It's 🕙 o'clock")
@pytest.mark.skip(
reason="cannot do foobar because baz is missing due to I don't know what"
reason="1 cannot do foobar because baz is missing due to I don't know what"
)
def test_long_skip():
pass
@pytest.mark.xfail(
reason="cannot do foobar because baz is missing due to I don't know what"
reason="2 cannot do foobar because baz is missing due to I don't know what"
)
def test_long_xfail():
print(1 / 0)
@ -417,8 +417,8 @@ class TestTerminal:
result.stdout.fnmatch_lines(
common_output
+ [
"test_verbose_skip_reason.py::test_long_skip SKIPPED (cannot *...) *",
"test_verbose_skip_reason.py::test_long_xfail XFAIL (cannot *...) *",
"test_verbose_skip_reason.py::test_long_skip SKIPPED (1 cannot *...) *",
"test_verbose_skip_reason.py::test_long_xfail XFAIL (2 cannot *...) *",
]
)
@ -428,12 +428,14 @@ class TestTerminal:
+ [
(
"test_verbose_skip_reason.py::test_long_skip SKIPPED"
" (cannot do foobar because baz is missing due to I don't know what) *"
" (1 cannot do foobar"
),
"because baz is missing due to I don't know what) *",
(
"test_verbose_skip_reason.py::test_long_xfail XFAIL"
" (cannot do foobar because baz is missing due to I don't know what) *"
" (2 cannot do foobar"
),
"because baz is missing due to I don't know what) *",
]
)