From 77647e48588a509534950ca4cf0a00164bb9716b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 11 Mar 2024 09:13:31 -0400 Subject: [PATCH 01/76] Refactor private_assert_caplog_records_is_setup_call Ensure all uses of caplog._item have a comment highlighting it is a private API and not for use in real tests! --- testing/logging/test_fixture.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/testing/logging/test_fixture.py b/testing/logging/test_fixture.py index 2e16913f099..3edce433583 100644 --- a/testing/logging/test_fixture.py +++ b/testing/logging/test_fixture.py @@ -302,6 +302,12 @@ def logging_during_setup_and_teardown( assert [x.message for x in caplog.get_records("teardown")] == ["a_teardown_log"] +def private_assert_caplog_records_is_setup_call(caplog: pytest.LogCaptureFixture) -> None: + # This reaches into private API, don't use this type of thing in real tests! + caplog_records = caplog._item.stash[caplog_records_key] + assert set(caplog_records) == {"setup", "call"} + + def test_caplog_captures_for_all_stages( caplog: pytest.LogCaptureFixture, logging_during_setup_and_teardown: None ) -> None: @@ -312,10 +318,7 @@ def test_caplog_captures_for_all_stages( assert [x.message for x in caplog.get_records("setup")] == ["a_setup_log"] - # This reaches into private API, don't use this type of thing in real tests! - caplog_records = caplog._item.stash[caplog_records_key] - assert set(caplog_records) == {"setup", "call"} - + private_assert_caplog_records_is_setup_call(caplog) def test_clear_for_call_stage( caplog: pytest.LogCaptureFixture, logging_during_setup_and_teardown: None @@ -323,21 +326,18 @@ def test_clear_for_call_stage( logger.info("a_call_log") assert [x.message for x in caplog.get_records("call")] == ["a_call_log"] assert [x.message for x in caplog.get_records("setup")] == ["a_setup_log"] - caplog_records = caplog._item.stash[caplog_records_key] - assert set(caplog_records) == {"setup", "call"} + private_assert_caplog_records_is_setup_call(caplog) caplog.clear() assert caplog.get_records("call") == [] assert [x.message for x in caplog.get_records("setup")] == ["a_setup_log"] - caplog_records = caplog._item.stash[caplog_records_key] - assert set(caplog_records) == {"setup", "call"} + private_assert_caplog_records_is_setup_call(caplog) logging.info("a_call_log_after_clear") assert [x.message for x in caplog.get_records("call")] == ["a_call_log_after_clear"] assert [x.message for x in caplog.get_records("setup")] == ["a_setup_log"] - caplog_records = caplog._item.stash[caplog_records_key] - assert set(caplog_records) == {"setup", "call"} + private_assert_caplog_records_is_setup_call(caplog) def test_ini_controls_global_log_level(pytester: Pytester) -> None: From 8fe62f6ebae7836c57c6f8fb99bce0026597d1fd Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 11 Mar 2024 09:22:08 -0400 Subject: [PATCH 02/76] Remove _caplog_ from test name All the tests in this file are tests of `caplog` --- testing/logging/test_fixture.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/logging/test_fixture.py b/testing/logging/test_fixture.py index 3edce433583..7ccafa28784 100644 --- a/testing/logging/test_fixture.py +++ b/testing/logging/test_fixture.py @@ -308,7 +308,7 @@ def private_assert_caplog_records_is_setup_call(caplog: pytest.LogCaptureFixture assert set(caplog_records) == {"setup", "call"} -def test_caplog_captures_for_all_stages( +def test_captures_for_all_stages( caplog: pytest.LogCaptureFixture, logging_during_setup_and_teardown: None ) -> None: assert not caplog.records @@ -367,7 +367,7 @@ def test_log_level_override(request, caplog): assert result.ret == 0 -def test_caplog_can_override_global_log_level(pytester: Pytester) -> None: +def test_can_override_global_log_level(pytester: Pytester) -> None: pytester.makepyfile( """ import pytest @@ -406,7 +406,7 @@ def test_log_level_override(request, caplog): assert result.ret == 0 -def test_caplog_captures_despite_exception(pytester: Pytester) -> None: +def test_captures_despite_exception(pytester: Pytester) -> None: pytester.makepyfile( """ import pytest From a7abe2c9a5aedd152b84e37145a3001d139e2c4a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:40:39 -0400 Subject: [PATCH 03/76] spelling: already Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_pluginmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index da43364f643..04bd44ebf06 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -446,7 +446,7 @@ def test_plugin_prevent_register(self, pytestpm: PytestPluginManager) -> None: assert len(l2) == len(l1) assert 42 not in l2 - def test_plugin_prevent_register_unregistered_alredy_registered( + def test_plugin_prevent_register_unregistered_already_registered( self, pytestpm: PytestPluginManager ) -> None: pytestpm.register(42, name="abc") From 3ff72df694ad35b85111c09785f5f87d6e8f01a2 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 13 Mar 2024 10:48:14 -0400 Subject: [PATCH 04/76] spelling: analysis pipelines Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 8ca3a748ba3..4bcda2d74ec 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -928,7 +928,7 @@ This list contains 1411 plugins. :pypi:`pytest-pings` 🦊 The pytest plugin for Firefox Telemetry 📊 Jun 29, 2019 3 - Alpha pytest (>=5.0.0) :pypi:`pytest-pinned` A simple pytest plugin for pinning tests Sep 17, 2021 4 - Beta pytest (>=3.5.0) :pypi:`pytest-pinpoint` A pytest plugin which runs SBFL algorithms to detect faults. Sep 25, 2020 N/A pytest (>=4.4.0) - :pypi:`pytest-pipeline` Pytest plugin for functional testing of data analysispipelines Jan 24, 2017 3 - Alpha N/A + :pypi:`pytest-pipeline` Pytest plugin for functional testing of data analysis pipelines Jan 24, 2017 3 - Alpha N/A :pypi:`pytest-pitch` runs tests in an order such that coverage increases as fast as possible Nov 02, 2023 4 - Beta pytest >=7.3.1 :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 From f016f51e8752e81a06166a60f5617c1ef12371d5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:41:54 -0400 Subject: [PATCH 05/76] spelling: anatoly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/release-2.4.0.rst | 2 +- doc/en/changelog.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/announce/release-2.4.0.rst b/doc/en/announce/release-2.4.0.rst index 138cc89576c..9b864329674 100644 --- a/doc/en/announce/release-2.4.0.rst +++ b/doc/en/announce/release-2.4.0.rst @@ -181,7 +181,7 @@ Bug fixes: partially failed (finalizers would not always be called before) - fix issue320 - fix class scope for fixtures when mixed with - module-level functions. Thanks Anatloy Bubenkoff. + module-level functions. Thanks Anatoly Bubenkoff. - you can specify "-q" or "-qq" to get different levels of "quieter" reporting (thanks Katarzyna Jachim) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index bea4257af0f..83718626996 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -8972,7 +8972,7 @@ Bug fixes: partially failed (finalizers would not always be called before) - fix issue320 - fix class scope for fixtures when mixed with - module-level functions. Thanks Anatloy Bubenkoff. + module-level functions. Thanks Anatoly Bubenkoff. - you can specify "-q" or "-qq" to get different levels of "quieter" reporting (thanks Katarzyna Jachim) From 7484a84896a683b211672b8f112d7a0ee7624c6f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:03:51 -0500 Subject: [PATCH 06/76] spelling: and Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 83718626996..25e5b1f9285 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -2597,7 +2597,7 @@ Improvements ------------ - :issue:`4375`: The ``pytest`` command now suppresses the ``BrokenPipeError`` error message that - is printed to stderr when the output of ``pytest`` is piped and and the pipe is + is printed to stderr when the output of ``pytest`` is piped and the pipe is closed by the piped-to program (common examples are ``less`` and ``head``). From 4b16fb6df5090c8e238bef6bd04940401feefdb5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:54:06 -0400 Subject: [PATCH 07/76] spelling: automatically Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 4bcda2d74ec..5866c92c5eb 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -702,7 +702,7 @@ This list contains 1411 plugins. :pypi:`pytest-keyring` A Pytest plugin to access the system's keyring to provide credentials for tests Oct 01, 2023 N/A pytest (>=7.1) :pypi:`pytest-kind` Kubernetes test support with KIND for pytest Nov 30, 2022 5 - Production/Stable N/A :pypi:`pytest-kivy` Kivy GUI tests fixtures using pytest Jul 06, 2021 4 - Beta pytest (>=3.6) - :pypi:`pytest-knows` A pytest plugin that can automaticly skip test case based on dependence info calculated by trace Aug 22, 2014 N/A N/A + :pypi:`pytest-knows` A pytest plugin that can automatically skip test case based on dependence info calculated by trace Aug 22, 2014 N/A N/A :pypi:`pytest-konira` Run Konira DSL tests with py.test Oct 09, 2011 N/A N/A :pypi:`pytest-koopmans` A plugin for testing the koopmans package Nov 21, 2022 4 - Beta pytest (>=3.5.0) :pypi:`pytest-krtech-common` pytest krtech common library Nov 28, 2016 4 - Beta N/A @@ -6131,7 +6131,7 @@ This list contains 1411 plugins. *status*: N/A, *requires*: N/A - A pytest plugin that can automaticly skip test case based on dependence info calculated by trace + A pytest plugin that can automatically skip test case based on dependence info calculated by trace :pypi:`pytest-konira` *last release*: Oct 09, 2011, From de585d1ebf1821da5ae7e2eb5c589320112fa385 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:58:08 -0400 Subject: [PATCH 08/76] spelling: bootstrapping Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_pluginmanager.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_pluginmanager.py b/testing/test_pluginmanager.py index 04bd44ebf06..99b003b66ed 100644 --- a/testing/test_pluginmanager.py +++ b/testing/test_pluginmanager.py @@ -420,7 +420,7 @@ def test_consider_conftest_deps( pytestpm.consider_conftest(mod, registration_name="unused") -class TestPytestPluginManagerBootstrapming: +class TestPytestPluginManagerBootstrapping: def test_preparse_args(self, pytestpm: PytestPluginManager) -> None: pytest.raises( ImportError, lambda: pytestpm.consider_preparse(["xyz", "-p", "hello123"]) From a0452341a260e074811df6b9e463d9a48040b05e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 20:00:01 -0400 Subject: [PATCH 09/76] spelling: cachefile Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_cacheprovider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_cacheprovider.py b/testing/test_cacheprovider.py index c020b77f978..192ef8fe822 100644 --- a/testing/test_cacheprovider.py +++ b/testing/test_cacheprovider.py @@ -38,7 +38,7 @@ def test_config_cache_dataerror(self, pytester: Pytester) -> None: assert val == -2 @pytest.mark.filterwarnings("ignore:could not create cache path") - def test_cache_writefail_cachfile_silent(self, pytester: Pytester) -> None: + def test_cache_writefail_cachefile_silent(self, pytester: Pytester) -> None: pytester.makeini("[pytest]") pytester.path.joinpath(".pytest_cache").write_text( "gone wrong", encoding="utf-8" From d414d4f41b351dfe4bb20cccfe8673ba74fe9e76 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:05:42 -0500 Subject: [PATCH 10/76] spelling: cannot Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- src/_pytest/_py/path.py | 2 +- src/_pytest/config/__init__.py | 2 +- src/_pytest/pathlib.py | 2 +- testing/test_junitxml.py | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 25e5b1f9285..9e699a7a0b5 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -6410,7 +6410,7 @@ Trivial/Internal Changes ------------------------ - Show a simple and easy error when keyword expressions trigger a syntax error - (for example, ``"-k foo and import"`` will show an error that you can not use + (for example, ``"-k foo and import"`` will show an error that you cannot use the ``import`` keyword in expressions). (:issue:`2953`) - Change parametrized automatic test id generation to use the ``__name__`` diff --git a/src/_pytest/_py/path.py b/src/_pytest/_py/path.py index 7bb3693f938..e8c092cc4a3 100644 --- a/src/_pytest/_py/path.py +++ b/src/_pytest/_py/path.py @@ -1047,7 +1047,7 @@ def chmod(self, mode, rec=0): def pypkgpath(self): """Return the Python package path by looking for the last directory upwards which still contains an __init__.py. - Return None if a pkgpath can not be determined. + Return None if a pkgpath cannot be determined. """ pkgpath = None for parent in self.parts(reverse=True): diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 7ff27643f10..fcba5a11216 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -454,7 +454,7 @@ def parse_hookimpl_opts( # (see issue #1073). if not name.startswith("pytest_"): return None - # Ignore names which can not be hooks. + # Ignore names which cannot be hooks. if name == "pytest_plugins": return None diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index e39f4772326..3efd2b1d7eb 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -732,7 +732,7 @@ def resolve_package_path(path: Path) -> Optional[Path]: """Return the Python package path by looking for the last directory upwards which still contains an __init__.py. - Returns None if it can not be determined. + Returns None if it cannot be determined. """ result = None for parent in itertools.chain((path,), path.parents): diff --git a/testing/test_junitxml.py b/testing/test_junitxml.py index 3b92d65bdb9..86edfbbeb61 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -1002,7 +1002,7 @@ def repr_failure(self, excinfo): @pytest.mark.parametrize("junit_logging", ["no", "system-out"]) def test_nullbyte(pytester: Pytester, junit_logging: str) -> None: - # A null byte can not occur in XML (see section 2.2 of the spec) + # A null byte cannot occur in XML (see section 2.2 of the spec) pytester.makepyfile( """ import sys From a0b1f52a1d12016d515ed703b424734b76b2bec1 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:06:06 -0500 Subject: [PATCH 11/76] spelling: case-insensitive Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/pathlib.py | 2 +- testing/_py/test_local.py | 2 +- testing/test_conftest.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index 3efd2b1d7eb..a25ccc62443 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -172,7 +172,7 @@ def rm_rf(path: Path) -> None: def find_prefixed(root: Path, prefix: str) -> Iterator["os.DirEntry[str]"]: - """Find all elements in root that begin with the prefix, case insensitive.""" + """Find all elements in root that begin with the prefix, case-insensitive.""" l_prefix = prefix.lower() for x in os.scandir(root): if x.name.lower().startswith(l_prefix): diff --git a/testing/_py/test_local.py b/testing/_py/test_local.py index ad2526571e6..609a29d4778 100644 --- a/testing/_py/test_local.py +++ b/testing/_py/test_local.py @@ -667,7 +667,7 @@ def test_tilde_expansion(self, monkeypatch, tmpdir): assert p == os.path.expanduser("~") @pytest.mark.skipif( - not sys.platform.startswith("win32"), reason="case insensitive only on windows" + not sys.platform.startswith("win32"), reason="case-insensitive only on windows" ) def test_eq_hash_are_case_insensitive_on_windows(self): a = local("/some/path") diff --git a/testing/test_conftest.py b/testing/test_conftest.py index 3116dfe2584..441446d58bf 100644 --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -396,7 +396,7 @@ def fixture(): @pytest.mark.skipif( os.path.normcase("x") != os.path.normcase("X"), - reason="only relevant for case insensitive file systems", + reason="only relevant for case-insensitive file systems", ) def test_conftest_badcase(pytester: Pytester) -> None: """Check conftest.py loading when directory casing is wrong (#5792).""" From 13bfc3856b8daa757f1081eda338a82f4470127b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 20:03:52 -0400 Subject: [PATCH 12/76] spelling: collection Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 5866c92c5eb..68097b92dd0 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -89,7 +89,7 @@ This list contains 1411 plugins. :pypi:`pytest-approvaltests` A plugin to use approvaltests with pytest May 08, 2022 4 - Beta pytest (>=7.0.1) :pypi:`pytest-approvaltests-geo` Extension for ApprovalTests.Python specific to geo data verification Feb 05, 2024 5 - Production/Stable pytest :pypi:`pytest-archon` Rule your architecture like a real developer Dec 18, 2023 5 - Production/Stable pytest >=7.2 - :pypi:`pytest-argus` pyest results colection plugin Jun 24, 2021 5 - Production/Stable pytest (>=6.2.4) + :pypi:`pytest-argus` pyest results collection plugin Jun 24, 2021 5 - Production/Stable pytest (>=6.2.4) :pypi:`pytest-arraydiff` pytest plugin to help with comparing array output from tests Nov 27, 2023 4 - Beta pytest >=4.6 :pypi:`pytest-asgi-server` Convenient ASGI client/server fixtures for Pytest Dec 12, 2020 N/A pytest (>=5.4.1) :pypi:`pytest-aspec` A rspec format reporter for pytest Dec 20, 2023 4 - Beta N/A @@ -1840,7 +1840,7 @@ This list contains 1411 plugins. *status*: 5 - Production/Stable, *requires*: pytest (>=6.2.4) - pyest results colection plugin + pyest results collection plugin :pypi:`pytest-arraydiff` *last release*: Nov 27, 2023, From bf1103aa95470837fe6a13cbb76fca6993759f8c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:15:17 -0400 Subject: [PATCH 13/76] spelling: completion Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 68097b92dd0..f7c9e84f272 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -511,7 +511,7 @@ This list contains 1411 plugins. :pypi:`pytest-find-dependencies` A pytest plugin to find dependencies between tests Apr 09, 2022 4 - Beta pytest (>=4.3.0) :pypi:`pytest-finer-verdicts` A pytest plugin to treat non-assertion failures as test errors. Jun 18, 2020 N/A pytest (>=5.4.3) :pypi:`pytest-firefox` pytest plugin to manipulate firefox Aug 08, 2017 3 - Alpha pytest (>=3.0.2) - :pypi:`pytest-fixture-classes` Fixtures as classes that work well with dependency injection, autocompletetion, type checkers, and language servers Sep 02, 2023 5 - Production/Stable pytest + :pypi:`pytest-fixture-classes` Fixtures as classes that work well with dependency injection, autocompletion, type checkers, and language servers Sep 02, 2023 5 - Production/Stable pytest :pypi:`pytest-fixturecollection` A pytest plugin to collect tests based on fixtures being used by tests Feb 22, 2024 4 - Beta pytest >=3.5.0 :pypi:`pytest-fixture-config` Fixture configuration utils for py.test May 28, 2019 5 - Production/Stable pytest :pypi:`pytest-fixture-maker` Pytest plugin to load fixtures from YAML files Sep 21, 2021 N/A N/A @@ -4794,7 +4794,7 @@ This list contains 1411 plugins. *status*: 5 - Production/Stable, *requires*: pytest - Fixtures as classes that work well with dependency injection, autocompletetion, type checkers, and language servers + Fixtures as classes that work well with dependency injection, autocompletion, type checkers, and language servers :pypi:`pytest-fixturecollection` *last release*: Feb 22, 2024, From e6e06e2a64c168223500af0972b1018debc20a3f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:16:45 -0400 Subject: [PATCH 14/76] spelling: consuming Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index f7c9e84f272..ad109886962 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -1031,7 +1031,7 @@ This list contains 1411 plugins. :pypi:`pytest-ranking` A Pytest plugin for automatically prioritizing/ranking tests to speed up failure detection Mar 01, 2024 4 - Beta pytest >=7.4.3 :pypi:`pytest-readme` Test your README.md file Sep 02, 2022 5 - Production/Stable N/A :pypi:`pytest-reana` Pytest fixtures for REANA. Nov 30, 2023 3 - Alpha N/A - :pypi:`pytest-recorder` Pytest plugin, meant to facilitate unit tests writing for tools consumming Web APIs. Nov 21, 2023 N/A N/A + :pypi:`pytest-recorder` Pytest plugin, meant to facilitate unit tests writing for tools consuming Web APIs. Nov 21, 2023 N/A N/A :pypi:`pytest-recording` A pytest plugin that allows you recording of network interactions via VCR.py Dec 06, 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. Apr 19, 2023 5 - Production/Stable pytest (>=6.2) @@ -8434,7 +8434,7 @@ This list contains 1411 plugins. *status*: N/A, *requires*: N/A - Pytest plugin, meant to facilitate unit tests writing for tools consumming Web APIs. + Pytest plugin, meant to facilitate unit tests writing for tools consuming Web APIs. :pypi:`pytest-recording` *last release*: Dec 06, 2023, From 34060efa29999b0bb307685c67f3a7d15b79f665 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:04:06 -0500 Subject: [PATCH 15/76] spelling: copy Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/_py/path.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/_py/path.py b/src/_pytest/_py/path.py index e8c092cc4a3..9b4ec68950d 100644 --- a/src/_pytest/_py/path.py +++ b/src/_pytest/_py/path.py @@ -836,7 +836,7 @@ def mtime(self) -> float: def copy(self, target, mode=False, stat=False): """Copy path to target. - If mode is True, will copy copy permission from path to target. + If mode is True, will copy permission from path to target. If stat is True, copy permission, last modification time, last access time, and flags from path to target. """ From ab8cc1f9aac1e1bfe21f0e8dc67578c191c877a3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:18:56 -0400 Subject: [PATCH 16/76] spelling: coroutine Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/compat.py | 2 +- testing/test_compat.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/compat.py b/src/_pytest/compat.py index 9d9411818ac..614848e0dba 100644 --- a/src/_pytest/compat.py +++ b/src/_pytest/compat.py @@ -53,7 +53,7 @@ def iscoroutinefunction(func: object) -> bool: def syntax, and doesn't contain yield), or a function decorated with @asyncio.coroutine. - Note: copied and modified from Python 3.5's builtin couroutines.py to avoid + Note: copied and modified from Python 3.5's builtin coroutines.py to avoid importing asyncio directly, which in turns also initializes the "logging" module as a side-effect (see issue #8). """ diff --git a/testing/test_compat.py b/testing/test_compat.py index c898af7c531..73ac1bad858 100644 --- a/testing/test_compat.py +++ b/testing/test_compat.py @@ -94,7 +94,7 @@ def foo(x): assert get_real_func(partial(foo)) is foo -@pytest.mark.skipif(sys.version_info >= (3, 11), reason="couroutine removed") +@pytest.mark.skipif(sys.version_info >= (3, 11), reason="coroutine removed") def test_is_generator_asyncio(pytester: Pytester) -> None: pytester.makepyfile( """ From ef9b18322b97d10addd65d5ac6e117acaa0d650c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:23:42 -0400 Subject: [PATCH 17/76] spelling: deprecation Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 9e699a7a0b5..7850a7b666f 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -1303,7 +1303,7 @@ Deprecations ``__init__`` method, they should take ``**kwargs``. See :ref:`uncooperative-constructors-deprecated` for details. - Note that a deprection warning is only emitted when there is a conflict in the + Note that a deprecation warning is only emitted when there is a conflict in the arguments pytest expected to pass. This deprecation was already part of pytest 7.0.0rc1 but wasn't documented. From 05b212a3e0445aff9a67c26cf01a12a52241d109 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:55:53 -0400 Subject: [PATCH 18/76] spelling: details Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/release-2.2.2.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/announce/release-2.2.2.rst b/doc/en/announce/release-2.2.2.rst index 22ef0bc7a16..510b35ee1d0 100644 --- a/doc/en/announce/release-2.2.2.rst +++ b/doc/en/announce/release-2.2.2.rst @@ -4,7 +4,7 @@ pytest-2.2.2: bug fixes pytest-2.2.2 (updated to 2.2.3 to fix packaging issues) is a minor backward-compatible release of the versatile py.test testing tool. It contains bug fixes and a few refinements particularly to reporting with -"--collectonly", see below for betails. +"--collectonly", see below for details. For general information see here: From 6ed10f4ef48c0da8ac854716fff9b7f34654c529 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:23:56 -0400 Subject: [PATCH 19/76] spelling: discussions Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/sprint2016.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/announce/sprint2016.rst b/doc/en/announce/sprint2016.rst index 8e706589876..8d47a205c71 100644 --- a/doc/en/announce/sprint2016.rst +++ b/doc/en/announce/sprint2016.rst @@ -49,7 +49,7 @@ place on 20th, 21st, 22nd, 24th and 25th. On the 23rd we took a break day for some hot hiking in the Black Forest. Sprint activity was organised heavily around pairing, with plenty of group -discusssions to take advantage of the high bandwidth, and lightning talks +discussions to take advantage of the high bandwidth, and lightning talks as well. From fa75c3fb18a4369fed8fc3bf9d88e899637febe7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:24:14 -0400 Subject: [PATCH 20/76] spelling: doctest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/release-2.7.0.rst | 2 +- doc/en/changelog.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/announce/release-2.7.0.rst b/doc/en/announce/release-2.7.0.rst index 2840178a07f..83cddb34157 100644 --- a/doc/en/announce/release-2.7.0.rst +++ b/doc/en/announce/release-2.7.0.rst @@ -55,7 +55,7 @@ holger krekel github. See https://pytest.org/en/stable/contributing.html . Thanks to Anatoly for pushing and initial work on this. -- fix issue650: new option ``--docttest-ignore-import-errors`` which +- fix issue650: new option ``--doctest-ignore-import-errors`` which will turn import errors in doctests into skips. Thanks Charles Cloud for the complete PR. diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 7850a7b666f..1c768a61d5c 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -8346,7 +8346,7 @@ time or change existing behaviors in order to make them less surprising/more use github. See https://pytest.org/en/stable/contributing.html . Thanks to Anatoly for pushing and initial work on this. -- fix issue650: new option ``--docttest-ignore-import-errors`` which +- fix issue650: new option ``--doctest-ignore-import-errors`` which will turn import errors in doctests into skips. Thanks Charles Cloud for the complete PR. From 4bff7d5c9a08c60afc2f8bf39c7e3c0f006586f7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:24:29 -0400 Subject: [PATCH 21/76] spelling: doctests Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/fixtures.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/reference/fixtures.rst b/doc/en/reference/fixtures.rst index 8ba59395e3e..dff93a035ef 100644 --- a/doc/en/reference/fixtures.rst +++ b/doc/en/reference/fixtures.rst @@ -39,7 +39,7 @@ Built-in fixtures Store and retrieve values across pytest runs. :fixture:`doctest_namespace` - Provide a dict injected into the docstests namespace. + Provide a dict injected into the doctests namespace. :fixture:`monkeypatch` Temporarily modify classes, functions, dictionaries, From 35533bd5accbbe0d55abc4d07d9033f5f7cdd22c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:25:35 -0400 Subject: [PATCH 22/76] spelling: errors Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index ad109886962..1df1f7a969d 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -266,7 +266,7 @@ This list contains 1411 plugins. :pypi:`pytest-copie` The pytest plugin for your copier templates 📒 Jan 27, 2024 3 - Alpha pytest :pypi:`pytest-copier` A pytest plugin to help testing Copier templates Dec 11, 2023 4 - Beta pytest>=7.3.2 :pypi:`pytest-couchdbkit` py.test extension for per-test couchdb databases using couchdbkit Apr 17, 2012 N/A N/A - :pypi:`pytest-count` count erros and send email Jan 12, 2018 4 - Beta N/A + :pypi:`pytest-count` count errors and send email Jan 12, 2018 4 - Beta N/A :pypi:`pytest-cov` Pytest plugin for measuring coverage. May 24, 2023 5 - Production/Stable pytest (>=4.6) :pypi:`pytest-cover` Pytest plugin for measuring coverage. Forked from \`pytest-cov\`. Aug 01, 2015 5 - Production/Stable N/A :pypi:`pytest-coverage` Jun 17, 2015 N/A N/A @@ -3079,7 +3079,7 @@ This list contains 1411 plugins. *status*: 4 - Beta, *requires*: N/A - count erros and send email + count errors and send email :pypi:`pytest-cov` *last release*: May 24, 2023, From d6cc4d3b5c4f99b9dc7bbe759c9979f8b425b5c6 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:25:42 -0400 Subject: [PATCH 23/76] spelling: escaped Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/assertion/rewrite.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index 678471ee992..4d903b5580b 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -584,7 +584,7 @@ def _write_and_reset() -> None: # multi-line assert with message elif lineno in seen_lines: lines[-1] = lines[-1][:offset] - # multi line assert with escapd newline before message + # multi line assert with escaped newline before message else: lines.append(line[:offset]) _write_and_reset() From 3f6acbb8a9de44971d92870e6ed2bf45b6d36648 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:26:36 -0400 Subject: [PATCH 24/76] spelling: evaluable Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/reference.rst | 2 +- src/_pytest/mark/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/reference.rst b/doc/en/reference/reference.rst index 358f371e5e9..54fc4131bb2 100644 --- a/doc/en/reference/reference.rst +++ b/doc/en/reference/reference.rst @@ -1919,7 +1919,7 @@ All the command-line flags can be obtained by running ``pytest --help``:: general: -k EXPRESSION Only run tests which match the given substring - expression. An expression is a Python evaluatable + expression. An expression is a Python evaluable expression where all names are substring-matched against test names and their parent classes. Example: -k 'test_method or test_other' matches all diff --git a/src/_pytest/mark/__init__.py b/src/_pytest/mark/__init__.py index 77dabd95dec..01d6e7165f2 100644 --- a/src/_pytest/mark/__init__.py +++ b/src/_pytest/mark/__init__.py @@ -78,7 +78,7 @@ def pytest_addoption(parser: Parser) -> None: default="", metavar="EXPRESSION", help="Only run tests which match the given substring expression. " - "An expression is a Python evaluatable expression " + "An expression is a Python evaluable expression " "where all names are substring-matched against test names " "and their parent classes. Example: -k 'test_method or test_" "other' matches all test functions and classes whose name " From fa1e25d5f6ac40f0004b195b3a004488e1a06abb Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:27:02 -0400 Subject: [PATCH 25/76] spelling: failures Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 1df1f7a969d..8fb45994954 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -273,7 +273,7 @@ This list contains 1411 plugins. :pypi:`pytest-coverage-context` Coverage dynamic context support for PyTest, including sub-processes Jun 28, 2023 4 - Beta N/A :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_covid` Too many faillure, less tests. Jun 24, 2020 N/A N/A + :pypi:`pytest_covid` Too many failures, less tests. Jun 24, 2020 N/A N/A :pypi:`pytest-cpp` Use pytest's runner to discover and execute C++ tests Nov 01, 2023 5 - Production/Stable pytest >=7.0 :pypi:`pytest-cppython` A pytest plugin that imports CPPython testing types Mar 09, 2024 N/A N/A :pypi:`pytest-cqase` Custom qase pytest plugin Aug 22, 2022 N/A pytest (>=7.1.2,<8.0.0) @@ -3128,7 +3128,7 @@ This list contains 1411 plugins. *status*: N/A, *requires*: N/A - Too many faillure, less tests. + Too many failures, less tests. :pypi:`pytest-cpp` *last release*: Nov 01, 2023, From 5694d5a65bc1081dd460fc6de2faa05e7c0e92ea Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:06:22 -0500 Subject: [PATCH 26/76] spelling: fine-grained Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 1c768a61d5c..8ef732d7c18 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -2580,7 +2580,7 @@ Features also changes ``sys.modules`` as a side-effect), which works but has a number of drawbacks, like requiring test modules that don't live in packages to have unique names (as they need to reside under a unique name in ``sys.modules``). - ``--import-mode=importlib`` uses more fine grained import mechanisms from ``importlib`` which don't + ``--import-mode=importlib`` uses more fine-grained import mechanisms from ``importlib`` which don't require pytest to change ``sys.path`` or ``sys.modules`` at all, eliminating much of the drawbacks of the previous mode. From 82fb1dcd979a95c5c12b0f53eab75f8d7a844886 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:27:32 -0400 Subject: [PATCH 27/76] spelling: fixes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 8ef732d7c18..7e13a472659 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -8715,7 +8715,7 @@ time or change existing behaviors in order to make them less surprising/more use it might be the cause for other finalizers to fail. - fix ordering when mock.patch or other standard decorator-wrappings - are used with test methods. This fixues issue346 and should + are used with test methods. This fixes issue346 and should help with random "xdist" collection failures. Thanks to Ronny Pfannschmidt and Donald Stufft for helping to isolate it. From 8a66f760e8ddfee0b5e0af44948c51b194df2bb6 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:27:43 -0400 Subject: [PATCH 28/76] spelling: fixturedef Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/hookspec.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index db55bd82d04..a3c29c0f0af 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -837,7 +837,7 @@ def pytest_fixture_setup( ) -> Optional[object]: """Perform fixture setup execution. - :param fixturdef: + :param fixturedef: The fixture definition object. :param request: The fixture request object. @@ -867,7 +867,7 @@ def pytest_fixture_post_finalizer( the fixture result ``fixturedef.cached_result`` is still available (not ``None``). - :param fixturdef: + :param fixturedef: The fixture definition object. :param request: The fixture request object. From e721a2043e1d7bf434d9f88299bb7887764d5fa5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:32:33 -0400 Subject: [PATCH 29/76] spelling: flatly Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/naming20.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/naming20.rst b/doc/en/naming20.rst index 5a81df2698d..11213066384 100644 --- a/doc/en/naming20.rst +++ b/doc/en/naming20.rst @@ -8,7 +8,7 @@ If you used older version of the ``py`` distribution (which included the py.test command line tool and Python name space) you accessed helpers and possibly collection classes through the ``py.test`` Python namespaces. The new ``pytest`` -Python module flaty provides the same objects, following +Python module flatly provides the same objects, following these renaming rules:: py.test.XYZ -> pytest.XYZ From 482d0116120141a6c5629561f4a34c7377970d5f Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:34:46 -0400 Subject: [PATCH 30/76] spelling: forward Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 8fb45994954..8eb9e1ba146 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -541,7 +541,7 @@ This list contains 1411 plugins. :pypi:`pytest-forbid` Mar 07, 2023 N/A pytest (>=7.2.2,<8.0.0) :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-forks` Fork helper for pytest Mar 05, 2024 N/A N/A - :pypi:`pytest-forward-compatability` A name to avoid typosquating pytest-foward-compatibility Sep 06, 2020 N/A N/A + :pypi:`pytest-forward-compatability` A name to avoid typosquating pytest-forward-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 Oct 29, 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) @@ -5004,14 +5004,14 @@ This list contains 1411 plugins. *status*: N/A, *requires*: N/A - A name to avoid typosquating pytest-foward-compatibility + A name to avoid typosquating pytest-forward-compatibility :pypi:`pytest-forward-compatibility` *last release*: Sep 29, 2020, *status*: N/A, *requires*: N/A - A pytest plugin to shim pytest commandline options for fowards compatibility + A pytest plugin to shim pytest commandline options for forwards compatibility :pypi:`pytest-frappe` *last release*: Oct 29, 2023, From 779cdd7eb0849deb3d265b65153e664babf0a7a4 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Thu, 14 Mar 2024 10:05:42 -0400 Subject: [PATCH 31/76] spelling: forwards Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 8eb9e1ba146..26e8b8dd770 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -542,7 +542,7 @@ This list contains 1411 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-forks` Fork helper for pytest Mar 05, 2024 N/A N/A :pypi:`pytest-forward-compatability` A name to avoid typosquating pytest-forward-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-forward-compatibility` A pytest plugin to shim pytest commandline options for forwards compatibility Sep 29, 2020 N/A N/A :pypi:`pytest-frappe` Pytest Frappe Plugin - A set of pytest fixtures to test Frappe applications Oct 29, 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 Jun 21, 2023 N/A pytest >= 3.6 From 5122cf879847630c560df76a024eda3c6259fd25 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 13 Mar 2024 12:47:21 -0400 Subject: [PATCH 32/76] spelling: highlighter Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/assertion/util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index cb671641041..e49c42cfcf7 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -325,7 +325,7 @@ def _diff_text(left: str, right: str, verbose: int = 0) -> List[str]: def _compare_eq_iterable( left: Iterable[Any], right: Iterable[Any], - highligher: _HighlightFunc, + highlighter: _HighlightFunc, verbose: int = 0, ) -> List[str]: if verbose <= 0 and not running_on_ci(): @@ -340,7 +340,7 @@ def _compare_eq_iterable( # "right" is the expected base against which we compare "left", # see https://github.com/pytest-dev/pytest/issues/3333 explanation.extend( - highligher( + highlighter( "\n".join( line.rstrip() for line in difflib.ndiff(right_formatting, left_formatting) From fcfb850e8784652d8b4a3a2de048915ecd8e7d81 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:47:08 -0400 Subject: [PATCH 33/76] spelling: information Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 26e8b8dd770..0a3e0fc3fb5 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -647,7 +647,7 @@ This list contains 1411 plugins. :pypi:`pytest-influxdb` Plugin for influxdb and pytest integration. Apr 20, 2021 N/A N/A :pypi:`pytest-info-collector` pytest plugin to collect information from tests May 26, 2019 3 - Alpha N/A :pypi:`pytest-info-plugin` Get executed interface information in pytest interface automation framework Sep 14, 2023 N/A N/A - :pypi:`pytest-informative-node` display more node ininformation. Apr 25, 2019 4 - Beta N/A + :pypi:`pytest-informative-node` display more node information. Apr 25, 2019 4 - Beta N/A :pypi:`pytest-infrastructure` pytest stack validation prior to testing executing Apr 12, 2020 4 - Beta N/A :pypi:`pytest-ini` Reuse pytest.ini to store env variables Apr 26, 2022 N/A N/A :pypi:`pytest-inline` A pytest plugin for writing inline tests. Oct 19, 2023 4 - Beta pytest >=7.0.0 @@ -5746,7 +5746,7 @@ This list contains 1411 plugins. *status*: 4 - Beta, *requires*: N/A - display more node ininformation. + display more node information. :pypi:`pytest-infrastructure` *last release*: Apr 12, 2020, From 7bf1831b48690a2255551ab99a10facba9a9a5f5 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:53:17 -0400 Subject: [PATCH 34/76] spelling: initial Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/config/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index fcba5a11216..f3f38eb7aa8 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -566,8 +566,8 @@ def _set_initial_conftests( self._noconftest = noconftest self._using_pyargs = pyargs foundanchor = False - for intitial_path in args: - path = str(intitial_path) + for initial_path in args: + path = str(initial_path) # remove node-id syntax i = path.find("::") if i != -1: From 5c1fda8b62af8eaf6f1411b241803832c1b19e03 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:48:34 -0400 Subject: [PATCH 35/76] spelling: initialization Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- testing/test_conftest.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 7e13a472659..cfbc4f0dd0d 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -9394,7 +9394,7 @@ Bug fixes: unexpected exceptions - fix issue47: timing output in junitxml for test cases is now correct - fix issue48: typo in MarkInfo repr leading to exception -- fix issue49: avoid confusing error when initizaliation partially fails +- fix issue49: avoid confusing error when initialization partially fails - fix issue44: env/username expansion for junitxml file path - show releaselevel information in test runs for pypy - reworked doc pages for better navigation and PDF generation diff --git a/testing/test_conftest.py b/testing/test_conftest.py index 441446d58bf..06438f082a9 100644 --- a/testing/test_conftest.py +++ b/testing/test_conftest.py @@ -70,7 +70,7 @@ def test_basic_init(self, basedir: Path) -> None: ) assert conftest._rget_with_confmod("a", p)[1] == 1 - def test_immediate_initialiation_and_incremental_are_the_same( + def test_immediate_initialization_and_incremental_are_the_same( self, basedir: Path ) -> None: conftest = PytestPluginManager() From dc50ab50fdd591699da3568b74e57d06c3fbd153 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:52:45 -0400 Subject: [PATCH 36/76] spelling: instanced Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/deprecations.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/deprecations.rst b/doc/en/deprecations.rst index cd6d1e60aef..f78342457c8 100644 --- a/doc/en/deprecations.rst +++ b/doc/en/deprecations.rst @@ -427,7 +427,7 @@ Now :class:`~pytest.Class` collects the test methods directly. Most plugins which reference ``Instance`` do so in order to ignore or skip it, using a check such as ``if isinstance(node, Instance): return``. Such plugins should simply remove consideration of ``Instance`` on pytest>=7. -However, to keep such uses working, a dummy type has been instanted in ``pytest.Instance`` and ``_pytest.python.Instance``, +However, to keep such uses working, a dummy type has been instanced in ``pytest.Instance`` and ``_pytest.python.Instance``, and importing it emits a deprecation warning. This was removed in pytest 8. From aa2cb8b355805b241a0a315f7fd7f732bbdf212e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:53:10 -0400 Subject: [PATCH 37/76] spelling: interact Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 0a3e0fc3fb5..e3a133f9054 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -47,7 +47,7 @@ This list contains 1411 plugins. :pypi:`pytest-adf-azure-identity` Pytest plugin for writing Azure Data Factory integration tests Mar 06, 2021 4 - Beta pytest (>=3.5.0) :pypi:`pytest-ads-testplan` Azure DevOps Test Case reporting for pytest tests Sep 15, 2022 N/A N/A :pypi:`pytest-affected` Nov 06, 2023 N/A N/A - :pypi:`pytest-agent` Service that exposes a REST API that can be used to interract remotely with Pytest. It is shipped with a dashboard that enables running tests in a more convenient way. Nov 25, 2021 N/A N/A + :pypi:`pytest-agent` Service that exposes a REST API that can be used to interact remotely with Pytest. It is shipped with a dashboard that enables running tests in a more convenient way. Nov 25, 2021 N/A N/A :pypi:`pytest-aggreport` pytest plugin for pytest-repeat that generate aggregate report of the same test cases with additional statistics details. Mar 07, 2021 4 - Beta pytest (>=6.2.2) :pypi:`pytest-aio` Pytest plugin for testing async python code Feb 03, 2023 4 - Beta pytest :pypi:`pytest-aiofiles` pytest fixtures for writing aiofiles tests with pyfakefs May 14, 2017 5 - Production/Stable N/A @@ -1546,7 +1546,7 @@ This list contains 1411 plugins. *status*: N/A, *requires*: N/A - Service that exposes a REST API that can be used to interract remotely with Pytest. It is shipped with a dashboard that enables running tests in a more convenient way. + Service that exposes a REST API that can be used to interact remotely with Pytest. It is shipped with a dashboard that enables running tests in a more convenient way. :pypi:`pytest-aggreport` *last release*: Mar 07, 2021, From 1af8e1a060f968910c370f77ce37ecab3eef44b0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:47:20 -0400 Subject: [PATCH 38/76] spelling: internally Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index e3a133f9054..6bf400880af 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -397,7 +397,7 @@ This list contains 1411 plugins. :pypi:`pytest-doctestplus` Pytest plugin with advanced doctest features. Mar 04, 2024 5 - Production/Stable pytest >=4.6 :pypi:`pytest-dogu-report` pytest plugin for dogu report Jul 07, 2023 N/A N/A :pypi:`pytest-dogu-sdk` pytest plugin for the Dogu Dec 14, 2023 N/A N/A - :pypi:`pytest-dolphin` Some extra stuff that we use ininternally Nov 30, 2016 4 - Beta pytest (==3.0.4) + :pypi:`pytest-dolphin` Some extra stuff that we use internally Nov 30, 2016 4 - Beta pytest (==3.0.4) :pypi:`pytest-donde` record pytest session characteristics per test item (coverage and duration) into a persistent file and use them in your own plugin or script. Oct 01, 2023 4 - Beta pytest >=7.3.1 :pypi:`pytest-doorstop` A pytest plugin for adding test results into doorstop items. Jun 09, 2020 4 - Beta pytest (>=3.5.0) :pypi:`pytest-dotenv` A py.test plugin that parses environment files before running tests Jun 16, 2020 4 - Beta pytest (>=5.0.0) @@ -3996,7 +3996,7 @@ This list contains 1411 plugins. *status*: 4 - Beta, *requires*: pytest (==3.0.4) - Some extra stuff that we use ininternally + Some extra stuff that we use internally :pypi:`pytest-donde` *last release*: Oct 01, 2023, From ad756734559fe152c593093ab884adee127ee8fb Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:04:31 -0500 Subject: [PATCH 39/76] spelling: into Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 6bf400880af..6034d3d206e 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -582,7 +582,7 @@ This list contains 1411 plugins. :pypi:`pytest-google-chat` Notify google chat channel for test results Mar 27, 2022 4 - Beta pytest :pypi:`pytest-graphql-schema` Get graphql schema as fixture for pytest Oct 18, 2019 N/A N/A :pypi:`pytest-greendots` Green progress dots Feb 08, 2014 3 - Alpha N/A - :pypi:`pytest-group-by-class` A Pytest plugin for running a subset of your tests by splitting them in to groups of classes. Jun 27, 2023 5 - Production/Stable pytest (>=2.5) + :pypi:`pytest-group-by-class` A Pytest plugin for running a subset of your tests by splitting them into groups of classes. Jun 27, 2023 5 - Production/Stable pytest (>=2.5) :pypi:`pytest-growl` Growl notifications for pytest results. Jan 13, 2014 5 - Production/Stable N/A :pypi:`pytest-grpc` pytest plugin for grpc May 01, 2020 N/A pytest (>=3.6.0) :pypi:`pytest-grunnur` Py.Test plugin for Grunnur-based packages. Feb 05, 2023 N/A N/A @@ -1205,7 +1205,7 @@ This list contains 1411 plugins. :pypi:`pytest-split` Pytest plugin which splits the test suite to equally sized sub suites based on test execution time. Jan 29, 2024 4 - Beta pytest (>=5,<9) :pypi:`pytest-split-ext` Pytest plugin which splits the test suite to equally sized sub suites based on test execution time. Sep 23, 2023 4 - Beta pytest (>=5,<8) :pypi:`pytest-splitio` Split.io SDK integration for e2e tests Sep 22, 2020 N/A pytest (<7,>=5.0) - :pypi:`pytest-split-tests` A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups. Forked from Mark Adams' original project pytest-test-groups. Jul 30, 2021 5 - Production/Stable pytest (>=2.5) + :pypi:`pytest-split-tests` A Pytest plugin for running a subset of your tests by splitting them into equally sized groups. Forked from Mark Adams' original project pytest-test-groups. Jul 30, 2021 5 - Production/Stable pytest (>=2.5) :pypi:`pytest-split-tests-tresorit` Feb 22, 2021 1 - Planning N/A :pypi:`pytest-splunk-addon` A Dynamic test tool for Splunk Apps and Add-ons Jan 12, 2024 N/A pytest (>5.4.0,<8) :pypi:`pytest-splunk-addon-ui-smartx` Library to support testing Splunk Add-on UX Feb 23, 2024 N/A N/A @@ -1270,8 +1270,8 @@ This list contains 1411 plugins. :pypi:`pytest-testconfig` Test configuration plugin for pytest. Jan 11, 2020 4 - Beta pytest (>=3.5.0) :pypi:`pytest-testdirectory` A py.test plugin providing temporary directories in unit tests. May 02, 2023 5 - Production/Stable pytest :pypi:`pytest-testdox` A testdox format reporter for pytest Jul 22, 2023 5 - Production/Stable pytest (>=4.6.0) - :pypi:`pytest-test-grouping` A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups. Feb 01, 2023 5 - Production/Stable pytest (>=2.5) - :pypi:`pytest-test-groups` A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups. Oct 25, 2016 5 - Production/Stable N/A + :pypi:`pytest-test-grouping` A Pytest plugin for running a subset of your tests by splitting them into equally sized groups. Feb 01, 2023 5 - Production/Stable pytest (>=2.5) + :pypi:`pytest-test-groups` A Pytest plugin for running a subset of your tests by splitting them into equally sized groups. Oct 25, 2016 5 - Production/Stable N/A :pypi:`pytest-testinfra` Test infrastructures Feb 15, 2024 5 - Production/Stable pytest >=6 :pypi:`pytest-testinfra-jpic` Test infrastructures Sep 21, 2023 5 - Production/Stable N/A :pypi:`pytest-testinfra-winrm-transport` Test infrastructures Sep 21, 2023 5 - Production/Stable N/A @@ -5291,7 +5291,7 @@ This list contains 1411 plugins. *status*: 5 - Production/Stable, *requires*: pytest (>=2.5) - A Pytest plugin for running a subset of your tests by splitting them in to groups of classes. + A Pytest plugin for running a subset of your tests by splitting them into groups of classes. :pypi:`pytest-growl` *last release*: Jan 13, 2014, @@ -9652,7 +9652,7 @@ This list contains 1411 plugins. *status*: 5 - Production/Stable, *requires*: pytest (>=2.5) - A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups. Forked from Mark Adams' original project pytest-test-groups. + A Pytest plugin for running a subset of your tests by splitting them into equally sized groups. Forked from Mark Adams' original project pytest-test-groups. :pypi:`pytest-split-tests-tresorit` *last release*: Feb 22, 2021, @@ -10107,14 +10107,14 @@ This list contains 1411 plugins. *status*: 5 - Production/Stable, *requires*: pytest (>=2.5) - A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups. + A Pytest plugin for running a subset of your tests by splitting them into equally sized groups. :pypi:`pytest-test-groups` *last release*: Oct 25, 2016, *status*: 5 - Production/Stable, *requires*: N/A - A Pytest plugin for running a subset of your tests by splitting them in to equally sized groups. + A Pytest plugin for running a subset of your tests by splitting them into equally sized groups. :pypi:`pytest-testinfra` *last release*: Feb 15, 2024, From a6be7a9ec40ecdb0f6e65e04000fcb9763eda475 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 21:52:29 -0400 Subject: [PATCH 40/76] spelling: isinstance Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_runner.py b/testing/test_runner.py index 8cc496f7064..1f05beb39e5 100644 --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -408,7 +408,7 @@ def test_func(): # assert rep.outcome.when == "setup" # assert rep.outcome.where.lineno == 3 # assert rep.outcome.where.path.basename == "test_func.py" - # assert instanace(rep.failed.failurerepr, PythonFailureRepr) + # assert isinstance(rep.failed.failurerepr, PythonFailureRepr) def test_systemexit_does_not_bail_out(self, pytester: Pytester) -> None: try: From 158b02f49ec23c8957797e83335c45eaab0359dc Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:06:31 -0500 Subject: [PATCH 41/76] spelling: its Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/stepwise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/stepwise.py b/src/_pytest/stepwise.py index 3ebebc288f8..92d3a297e0d 100644 --- a/src/_pytest/stepwise.py +++ b/src/_pytest/stepwise.py @@ -40,7 +40,7 @@ def pytest_addoption(parser: Parser) -> None: @pytest.hookimpl def pytest_configure(config: Config) -> None: if config.option.stepwise_skip: - # allow --stepwise-skip to work on it's own merits. + # allow --stepwise-skip to work on its own merits. config.option.stepwise = True if config.getoption("stepwise"): config.pluginmanager.register(StepwisePlugin(config), "stepwiseplugin") From a75aeedbbfe97200dc98b179bf78c51f0bbe4d43 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:21:22 -0400 Subject: [PATCH 42/76] spelling: limitations Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index cfbc4f0dd0d..573431cfa68 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -4504,7 +4504,7 @@ Bug Fixes Improved Documentation ---------------------- -- :issue:`4974`: Update docs for ``pytest_cmdline_parse`` hook to note availability liminations +- :issue:`4974`: Update docs for ``pytest_cmdline_parse`` hook to note availability limitations From 6b3939eff44276718f40ec96b78533c061e4f6f8 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:06:40 -0500 Subject: [PATCH 43/76] spelling: macos Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 573431cfa68..0cd88c088f0 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -6362,7 +6362,7 @@ Features Bug Fixes --------- -- Fix hanging pexpect test on MacOS by using flush() instead of wait(). +- Fix hanging pexpect test on macOS by using flush() instead of wait(). (:issue:`2022`) - Fix restoring Python state after in-process pytest runs with the From 22936ed2d880db6aecdb5838151911ce7c08ecf7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:21:54 -0400 Subject: [PATCH 44/76] spelling: manifest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/example/customdirectory/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/example/customdirectory/conftest.py b/doc/en/example/customdirectory/conftest.py index 350893cab43..b2f68dba41a 100644 --- a/doc/en/example/customdirectory/conftest.py +++ b/doc/en/example/customdirectory/conftest.py @@ -21,7 +21,7 @@ def collect(self): @pytest.hookimpl def pytest_collect_directory(path, parent): - # Use our custom collector for directories containing a `mainfest.json` file. + # Use our custom collector for directories containing a `manifest.json` file. if path.joinpath("manifest.json").is_file(): return ManifestDirectory.from_parent(parent=parent, path=path) # Otherwise fallback to the standard behavior. From c8e4d6cf6712456333372cbedb283e3375467247 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 18:49:53 -0400 Subject: [PATCH 45/76] spelling: many Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/release-2.0.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/announce/release-2.0.0.rst b/doc/en/announce/release-2.0.0.rst index ecb1a1db988..a5b733b8dd1 100644 --- a/doc/en/announce/release-2.0.0.rst +++ b/doc/en/announce/release-2.0.0.rst @@ -62,7 +62,7 @@ New Features - new "-q" option which decreases verbosity and prints a more nose/unittest-style "dot" output. -- many many more detailed improvements details +- many, many, more detailed improvements details Fixes ----------------------- From 375e516a9f3cd7818258a2e2112acccabd273ff3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 18:50:47 -0400 Subject: [PATCH 46/76] spelling: much Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/release-2.0.0.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/announce/release-2.0.0.rst b/doc/en/announce/release-2.0.0.rst index a5b733b8dd1..c2a9f6da4d5 100644 --- a/doc/en/announce/release-2.0.0.rst +++ b/doc/en/announce/release-2.0.0.rst @@ -109,7 +109,7 @@ Important Notes in conftest.py files. They will cause nothing special. - removed support for calling the pre-1.0 collection API of "run()" and "join" - removed reading option values from conftest.py files or env variables. - This can now be done much much better and easier through the ini-file + This can now be done much, much, better and easier through the ini-file mechanism and the "addopts" entry in particular. - removed the "disabled" attribute in test classes. Use the skipping and pytestmark mechanism to skip or xfail a test class. From ce3c9949e029a40c523de1485c6b235d9ececb9a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:22:31 -0400 Subject: [PATCH 47/76] spelling: multiline Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/code/test_source.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/code/test_source.py b/testing/code/test_source.py index 12ea27b3517..2fa85205795 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -255,7 +255,7 @@ def g(): assert str(g_source).strip() == "def g():\n pass # pragma: no cover" -def test_getfuncsource_with_multine_string() -> None: +def test_getfuncsource_with_multiline_string() -> None: def f(): c = """while True: pass From 3327c2c6ad4154c06320a1b9c9b4a34835014974 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:23:14 -0400 Subject: [PATCH 48/76] spelling: negative Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/code/test_excinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index 419c11abcc0..c081606e76b 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -1515,7 +1515,7 @@ def test(tmp_path): result.stderr.no_fnmatch_line("*INTERNALERROR*") -def test_regression_nagative_line_index(pytester: Pytester) -> None: +def test_regression_negative_line_index(pytester: Pytester) -> None: """ With Python 3.10 alphas, there was an INTERNALERROR reported in https://github.com/pytest-dev/pytest/pull/8227 From c6d8e778e2e4687b0f8abb3078609dd1fcf23c3c Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Wed, 13 Mar 2024 12:52:49 -0400 Subject: [PATCH 49/76] spelling: oddities Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_mark_expression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_mark_expression.py b/testing/test_mark_expression.py index a7a9cf3044a..07c89f90838 100644 --- a/testing/test_mark_expression.py +++ b/testing/test_mark_expression.py @@ -61,7 +61,7 @@ def test_basic(expr: str, expected: bool) -> None: ("not not not not not true", False), ), ) -def test_syntax_oddeties(expr: str, expected: bool) -> None: +def test_syntax_oddities(expr: str, expected: bool) -> None: matcher = {"true": True, "false": False}.__getitem__ assert evaluate(expr, matcher) is expected From c296571aa889fc977e02c80cc072a72c396e542e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:29:33 -0400 Subject: [PATCH 50/76] spelling: overridden Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_config.py | 2 +- testing/test_doctest.py | 6 +++--- testing/test_legacypath.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/test_config.py b/testing/test_config.py index 147c2cb851c..da2492ca336 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -1740,7 +1740,7 @@ def pytest_addoption(parser): ) pytester.makepyfile( r""" - def test_overriden(pytestconfig): + def test_overridden(pytestconfig): config_paths = pytestconfig.getini("paths") print(config_paths) for cpf in config_paths: diff --git a/testing/test_doctest.py b/testing/test_doctest.py index 58fce244f45..c2e831505ce 100644 --- a/testing/test_doctest.py +++ b/testing/test_doctest.py @@ -396,7 +396,7 @@ def some_property(self): ] ) - def test_doctest_no_linedata_on_overriden_property(self, pytester: Pytester): + def test_doctest_no_linedata_on_overridden_property(self, pytester: Pytester): pytester.makepyfile( """ class Sample(object): @@ -414,7 +414,7 @@ def some_property(self): result.stdout.fnmatch_lines( [ "*= FAILURES =*", - "*_ [[]doctest[]] test_doctest_no_linedata_on_overriden_property.Sample.some_property _*", + "*_ [[]doctest[]] test_doctest_no_linedata_on_overridden_property.Sample.some_property _*", "EXAMPLE LOCATION UNKNOWN, not showing all tests of that example", "[?][?][?] >>> Sample().some_property", "Expected:", @@ -422,7 +422,7 @@ def some_property(self): "Got:", " 'something'", "", - "*/test_doctest_no_linedata_on_overriden_property.py:None: DocTestFailure", + "*/test_doctest_no_linedata_on_overridden_property.py:None: DocTestFailure", "*= 1 failed in *", ] ) diff --git a/testing/test_legacypath.py b/testing/test_legacypath.py index 49e620c1138..ad4e22e46b4 100644 --- a/testing/test_legacypath.py +++ b/testing/test_legacypath.py @@ -155,7 +155,7 @@ def pytest_addoption(parser): ) pytester.makepyfile( r""" - def test_overriden(pytestconfig): + def test_overridden(pytestconfig): config_paths = pytestconfig.getini("paths") print(config_paths) for cpf in config_paths: From 0ebd18b0b1d6d6a173990f0efed2fd8f2a27dca3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:30:16 -0400 Subject: [PATCH 51/76] spelling: parameterization Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 0cd88c088f0..7494f66160b 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -9519,7 +9519,7 @@ Bug fixes: collection-before-running semantics were not setup as with pytest 1.3.4. Note, however, that the recommended and much cleaner way to do test - parametraization remains the "pytest_generate_tests" + parameterization remains the "pytest_generate_tests" mechanism, see the docs. 2.0.0 (2010-11-25) From 2dcfe26ddaf572d2261f79db1fea2182627e2910 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:29:46 -0400 Subject: [PATCH 52/76] spelling: parametrized Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/release-2.5.0.rst | 2 +- doc/en/changelog.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/announce/release-2.5.0.rst b/doc/en/announce/release-2.5.0.rst index c6cdcdd8a83..fe64f1b8668 100644 --- a/doc/en/announce/release-2.5.0.rst +++ b/doc/en/announce/release-2.5.0.rst @@ -83,7 +83,7 @@ holger krekel Thanks Ralph Schmitt for the precise failure example. - fix issue244 by implementing special index for parameters to only use - indices for paramentrized test ids + indices for parametrized test ids - fix issue287 by running all finalizers but saving the exception from the first failing finalizer and re-raising it so teardown will diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 7494f66160b..88a1a9c288d 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -8707,7 +8707,7 @@ time or change existing behaviors in order to make them less surprising/more use Thanks Ralph Schmitt for the precise failure example. - fix issue244 by implementing special index for parameters to only use - indices for paramentrized test ids + indices for parametrized test ids - fix issue287 by running all finalizers but saving the exception from the first failing finalizer and re-raising it so teardown will From 45859596386b322a27d70c6123cdd0db0b54a05b Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:30:53 -0400 Subject: [PATCH 53/76] spelling: permission Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/_py/test_local.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/_py/test_local.py b/testing/_py/test_local.py index 609a29d4778..1b5b344551c 100644 --- a/testing/_py/test_local.py +++ b/testing/_py/test_local.py @@ -898,7 +898,7 @@ def test_sysfind_bat_exe_before(self, tmpdir, monkeypatch): class TestExecution: pytestmark = skiponwin32 - def test_sysfind_no_permisson_ignored(self, monkeypatch, tmpdir): + def test_sysfind_no_permission_ignored(self, monkeypatch, tmpdir): noperm = tmpdir.ensure("noperm", dir=True) monkeypatch.setenv("PATH", str(noperm), prepend=":") noperm.chmod(0) From 16a1cc012790ba9d9eae56643f8e688bb1126b9e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:06:51 -0500 Subject: [PATCH 54/76] spelling: preexisting Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 4 ++-- doc/en/getting-started.rst | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 88a1a9c288d..66a87b5a455 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -1853,7 +1853,7 @@ Bug Fixes the ``tmp_path``/``tmpdir`` fixture). Now the directories are created with private permissions. - pytest used to silently use a pre-existing ``/tmp/pytest-of-`` directory, + pytest used to silently use a preexisting ``/tmp/pytest-of-`` directory, even if owned by another user. This means another user could pre-create such a directory and gain control of another user's temporary directory. Now such a condition results in an error. @@ -8186,7 +8186,7 @@ time or change existing behaviors in order to make them less surprising/more use one will also have a "reprec" attribute with the recorded events/reports. - fix monkeypatch.setattr("x.y", raising=False) to actually not raise - if "y" is not a pre-existing attribute. Thanks Florian Bruhin. + if "y" is not a preexisting attribute. Thanks Florian Bruhin. - fix issue741: make running output from testdir.run copy/pasteable Thanks Bruno Oliveira. diff --git a/doc/en/getting-started.rst b/doc/en/getting-started.rst index 40632645d16..56e481a6e84 100644 --- a/doc/en/getting-started.rst +++ b/doc/en/getting-started.rst @@ -274,7 +274,7 @@ Continue reading Check out additional pytest resources to help you customize tests for your unique workflow: * ":ref:`usage`" for command line invocation examples -* ":ref:`existingtestsuite`" for working with pre-existing tests +* ":ref:`existingtestsuite`" for working with preexisting tests * ":ref:`mark`" for information on the ``pytest.mark`` mechanism * ":ref:`fixtures`" for providing a functional baseline to your tests * ":ref:`plugins`" for managing and writing plugins From fe8e0387a481cbe82550bd6dde1a0769c0835641 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:10:58 -0400 Subject: [PATCH 55/76] spelling: previously Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 66a87b5a455..e1cea1cb3b3 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -60,7 +60,7 @@ Improvements - `#11311 `_: When using ``--override-ini`` for paths in invocations without a configuration file defined, the current working directory is used as the relative directory. - Previoulsy this would raise an :class:`AssertionError`. + Previously this would raise an :class:`AssertionError`. - `#11475 `_: :ref:`--import-mode=importlib ` now tries to import modules using the standard import mechanism (but still without changing :py:data:`sys.path`), falling back to importing modules directly only if that fails. From ef7ed91f8611c84be567a6dc34bdd9d5cb3ecae0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:11:16 -0400 Subject: [PATCH 56/76] spelling: prioritize Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/cacheprovider.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/cacheprovider.py b/src/_pytest/cacheprovider.py index 81703ddac44..be5d115e910 100755 --- a/src/_pytest/cacheprovider.py +++ b/src/_pytest/cacheprovider.py @@ -230,7 +230,7 @@ def pytest_make_collect_report( # Sort any lf-paths to the beginning. lf_paths = self.lfplugin._last_failed_paths - # Use stable sort to priorize last failed. + # Use stable sort to prioritize last failed. def sort_key(node: Union[nodes.Item, nodes.Collector]) -> bool: return node.path in lf_paths From faa2f2e38ebc7f1e7d56e5a8747ea4b408d14fc3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 20:04:00 -0400 Subject: [PATCH 57/76] spelling: pytest Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 6034d3d206e..88dba431415 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -89,7 +89,7 @@ This list contains 1411 plugins. :pypi:`pytest-approvaltests` A plugin to use approvaltests with pytest May 08, 2022 4 - Beta pytest (>=7.0.1) :pypi:`pytest-approvaltests-geo` Extension for ApprovalTests.Python specific to geo data verification Feb 05, 2024 5 - Production/Stable pytest :pypi:`pytest-archon` Rule your architecture like a real developer Dec 18, 2023 5 - Production/Stable pytest >=7.2 - :pypi:`pytest-argus` pyest results collection plugin Jun 24, 2021 5 - Production/Stable pytest (>=6.2.4) + :pypi:`pytest-argus` pytest results collection plugin Jun 24, 2021 5 - Production/Stable pytest (>=6.2.4) :pypi:`pytest-arraydiff` pytest plugin to help with comparing array output from tests Nov 27, 2023 4 - Beta pytest >=4.6 :pypi:`pytest-asgi-server` Convenient ASGI client/server fixtures for Pytest Dec 12, 2020 N/A pytest (>=5.4.1) :pypi:`pytest-aspec` A rspec format reporter for pytest Dec 20, 2023 4 - Beta N/A @@ -1840,7 +1840,7 @@ This list contains 1411 plugins. *status*: 5 - Production/Stable, *requires*: pytest (>=6.2.4) - pyest results collection plugin + pytest results collection plugin :pypi:`pytest-arraydiff` *last release*: Nov 27, 2023, From d372ff2fd49480f69e1a5e3f5d3127dd25ac29d3 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:31:57 -0400 Subject: [PATCH 58/76] spelling: raised Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/python/fixtures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/python/fixtures.py b/testing/python/fixtures.py index 2e277626cde..e22392cdd22 100644 --- a/testing/python/fixtures.py +++ b/testing/python/fixtures.py @@ -933,7 +933,7 @@ def test_request_subrequest_addfinalizer_exceptions( ) -> None: """ Ensure exceptions raised during teardown by finalizers are suppressed - until all finalizers are called, then re-reaised together in an + until all finalizers are called, then re-raised together in an exception group (#2440) """ pytester.makepyfile( From 2a12477d2a80c5a52ef08f1a8bb811d947f98c8a Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:07:12 -0500 Subject: [PATCH 59/76] spelling: reentrant Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_debugging.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/test_debugging.py b/testing/test_debugging.py index 53ebadbdba4..7582dac6742 100644 --- a/testing/test_debugging.py +++ b/testing/test_debugging.py @@ -1122,7 +1122,7 @@ def test_func_kw(myparam, request, func="func_kw"): def test_trace_after_runpytest(pytester: Pytester) -> None: - """Test that debugging's pytest_configure is re-entrant.""" + """Test that debugging's pytest_configure is reentrant.""" p1 = pytester.makepyfile( """ from _pytest.debugging import pytestPDB @@ -1153,7 +1153,7 @@ def test_inner(): def test_quit_with_swallowed_SystemExit(pytester: Pytester) -> None: - """Test that debugging's pytest_configure is re-entrant.""" + """Test that debugging's pytest_configure is reentrant.""" p1 = pytester.makepyfile( """ def call_pdb_set_trace(): From ea949cef4649763b13962d6a6c1e3f1dad1a4733 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:32:04 -0400 Subject: [PATCH 60/76] spelling: regression Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_terminal.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_terminal.py b/testing/test_terminal.py index f4942510991..395fc198bf2 100644 --- a/testing/test_terminal.py +++ b/testing/test_terminal.py @@ -926,7 +926,7 @@ def test_header(self, pytester: Pytester) -> None: def test_header_absolute_testpath( self, pytester: Pytester, monkeypatch: MonkeyPatch ) -> None: - """Regresstion test for #7814.""" + """Regression test for #7814.""" tests = pytester.path.joinpath("tests") tests.mkdir() pytester.makepyprojecttoml( From 57f9adcde0011c13a66cdcc2b3d8d80c6b159757 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:18:34 -0400 Subject: [PATCH 61/76] spelling: report Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 88dba431415..ea6267cad14 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -749,7 +749,7 @@ This list contains 1411 plugins. :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 Feb 05, 2024 5 - Production/Stable pytest ==8.0.0 - :pypi:`pytest-log-report` Package for creating a pytest test run reprot Dec 26, 2019 N/A N/A + :pypi:`pytest-log-report` Package for creating a pytest test run report Dec 26, 2019 N/A N/A :pypi:`pytest-loguru` Pytest Loguru Oct 04, 2023 5 - Production/Stable pytest :pypi:`pytest-loop` pytest plugin for looping tests Jul 22, 2022 5 - Production/Stable pytest (>=6) :pypi:`pytest-lsp` A pytest plugin for end-to-end testing of language servers Feb 07, 2024 3 - Alpha pytest @@ -6460,7 +6460,7 @@ This list contains 1411 plugins. *status*: N/A, *requires*: N/A - Package for creating a pytest test run reprot + Package for creating a pytest test run report :pypi:`pytest-loguru` *last release*: Oct 04, 2023, From 07268b5b515517ed245cea36b88cdba98900fabf Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:19:52 -0400 Subject: [PATCH 62/76] spelling: rootpath Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test_config.py b/testing/test_config.py index da2492ca336..0d097f71622 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -217,7 +217,7 @@ def test_toml_parse_error(self, pytester: Pytester) -> None: def test_confcutdir_default_without_configfile(self, pytester: Pytester) -> None: # If --confcutdir is not specified, and there is no configfile, default - # to the roothpath. + # to the rootpath. sub = pytester.mkdir("sub") os.chdir(sub) config = pytester.parseconfigure() From 90a8c4ee211138e4a7edbac29e4e2dcab6077e9d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:33:09 -0400 Subject: [PATCH 63/76] spelling: running Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index ea6267cad14..79ec05ee23e 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -636,7 +636,7 @@ This list contains 1411 plugins. :pypi:`pytest-iam` A fully functional OAUTH2 / OpenID Connect (OIDC) server to be used in your testsuite Jan 24, 2024 3 - Alpha pytest (>=7.0.0,<8.0.0) :pypi:`pytest-ibutsu` A plugin to sent pytest results to an Ibutsu server Aug 05, 2022 4 - Beta pytest>=7.1 :pypi:`pytest-icdiff` use icdiff for better error messages in pytest assertions Dec 05, 2023 4 - Beta pytest - :pypi:`pytest-idapro` A pytest plugin for idapython. Allows a pytest setup to run tests outside and inside IDA in an automated manner by runnig pytest inside IDA and by mocking idapython api Nov 03, 2018 N/A N/A + :pypi:`pytest-idapro` A pytest plugin for idapython. Allows a pytest setup to run tests outside and inside IDA in an automated manner by running pytest inside IDA and by mocking idapython api Nov 03, 2018 N/A N/A :pypi:`pytest-idem` A pytest plugin to help with testing idem projects Dec 13, 2023 5 - Production/Stable N/A :pypi:`pytest-idempotent` Pytest plugin for testing function idempotence. Jul 25, 2022 N/A N/A :pypi:`pytest-ignore-flaky` ignore failures from flaky tests (pytest plugin) Oct 11, 2023 5 - Production/Stable pytest >=6.0 @@ -5669,7 +5669,7 @@ This list contains 1411 plugins. *status*: N/A, *requires*: N/A - A pytest plugin for idapython. Allows a pytest setup to run tests outside and inside IDA in an automated manner by runnig pytest inside IDA and by mocking idapython api + A pytest plugin for idapython. Allows a pytest setup to run tests outside and inside IDA in an automated manner by running pytest inside IDA and by mocking idapython api :pypi:`pytest-idem` *last release*: Dec 13, 2023, From 8406e52b83cebde0189fc092660fa0b375522f50 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:33:47 -0400 Subject: [PATCH 64/76] spelling: something Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- src/_pytest/fixtures.py | 2 +- testing/python/integration.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index e1cea1cb3b3..c39267200c2 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -2899,7 +2899,7 @@ Breaking Changes This hook has been marked as deprecated and not been even called by pytest for over 10 years now. -- :issue:`6673`: Reversed / fix meaning of "+/-" in error diffs. "-" means that sth. expected is missing in the result and "+" means that there are unexpected extras in the result. +- :issue:`6673`: Reversed / fix meaning of "+/-" in error diffs. "-" means that something expected is missing in the result and "+" means that there are unexpected extras in the result. - :issue:`6737`: The ``cached_result`` attribute of ``FixtureDef`` is now set to ``None`` when diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index 8b25d743ca4..465f61473ff 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -323,7 +323,7 @@ def prune_dependency_tree(self) -> None: working_set = set(self.initialnames) while working_set: argname = working_set.pop() - # Argname may be smth not included in the original names_closure, + # Argname may be something not included in the original names_closure, # in which case we ignore it. This currently happens with pseudo # FixtureDefs which wrap 'get_direct_param_fixture_func(request)'. # So they introduce the new dependency 'request' which might have diff --git a/testing/python/integration.py b/testing/python/integration.py index 219ebf9cec8..c20aaeed839 100644 --- a/testing/python/integration.py +++ b/testing/python/integration.py @@ -163,7 +163,7 @@ def mock_basename(path): @mock.patch("os.path.abspath") @mock.patch("os.path.normpath") @mock.patch("os.path.basename", new=mock_basename) - def test_someting(normpath, abspath, tmp_path): + def test_something(normpath, abspath, tmp_path): abspath.return_value = "this" os.path.normpath(os.path.abspath("hello")) normpath.assert_any_call("this") @@ -176,7 +176,7 @@ def test_someting(normpath, abspath, tmp_path): funcnames = [ call.report.location[2] for call in calls if call.report.when == "call" ] - assert funcnames == ["T.test_hello", "test_someting"] + assert funcnames == ["T.test_hello", "test_something"] def test_mock_sorting(self, pytester: Pytester) -> None: pytest.importorskip("mock", "1.0.1") From 033dc5fd62a1ff19a831b5052f80608821665a98 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:29:32 -0400 Subject: [PATCH 65/76] spelling: startdir Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/legacypath.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/_pytest/legacypath.py b/src/_pytest/legacypath.py index b28c89767fe..d9de65b1a53 100644 --- a/src/_pytest/legacypath.py +++ b/src/_pytest/legacypath.py @@ -384,7 +384,7 @@ def Config_inifile(self: Config) -> Optional[LEGACY_PATH]: return legacy_path(str(self.inipath)) if self.inipath else None -def Session_stardir(self: Session) -> LEGACY_PATH: +def Session_startdir(self: Session) -> LEGACY_PATH: """The path from which pytest was invoked. Prefer to use ``startpath`` which is a :class:`pathlib.Path`. @@ -439,7 +439,7 @@ def pytest_load_initial_conftests(early_config: Config) -> None: mp.setattr(Config, "inifile", property(Config_inifile), raising=False) # Add Session.startdir property. - mp.setattr(Session, "startdir", property(Session_stardir), raising=False) + mp.setattr(Session, "startdir", property(Session_startdir), raising=False) # Add pathlist configuration type. mp.setattr(Config, "_getini_unknown_type", Config__getini_unknown_type) From 0fd50b8ed83ca9bc5c9fcac31cc13ac1abbd26fe Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:31:58 -0400 Subject: [PATCH 66/76] spelling: suppressing Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/how-to/writing_hook_functions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/how-to/writing_hook_functions.rst b/doc/en/how-to/writing_hook_functions.rst index 5d0a52f9d38..f4c00d04fda 100644 --- a/doc/en/how-to/writing_hook_functions.rst +++ b/doc/en/how-to/writing_hook_functions.rst @@ -100,7 +100,7 @@ object, the wrapper may modify that result, but it's probably better to avoid it If the hook implementation failed with an exception, the wrapper can handle that exception using a ``try-catch-finally`` around the ``yield``, by propagating it, -supressing it, or raising a different exception entirely. +suppressing it, or raising a different exception entirely. For more information, consult the :ref:`pluggy documentation about hook wrappers `. From da213cf9d0c749efe6513da2efd93905b24e0bd0 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:32:36 -0400 Subject: [PATCH 67/76] spelling: synchronize Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/reference/plugin_list.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 79ec05ee23e..907f197736a 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -1097,7 +1097,7 @@ This list contains 1411 plugins. :pypi:`pytest-rich-reporter` A pytest plugin using Rich for beautiful test result formatting. Feb 17, 2022 1 - Planning pytest (>=5.0.0) :pypi:`pytest-richtrace` A pytest plugin that displays the names and information of the pytest hook functions as they are executed. Jun 20, 2023 N/A N/A :pypi:`pytest-ringo` pytest plugin to test webapplications using the Ringo webframework Sep 27, 2017 3 - Alpha N/A - :pypi:`pytest-rmsis` Sycronise pytest results to Jira RMsis Aug 10, 2022 N/A pytest (>=5.3.5) + :pypi:`pytest-rmsis` Synchronize pytest results to Jira RMsis Aug 10, 2022 N/A pytest (>=5.3.5) :pypi:`pytest-rng` Fixtures for seeding tests and making randomness reproducible Aug 08, 2019 5 - Production/Stable pytest :pypi:`pytest-roast` pytest plugin for ROAST configuration override and fixtures Nov 09, 2022 5 - Production/Stable pytest :pypi:`pytest_robotframework` a pytest plugin that can run both python and robotframework tests while generating robot reports for them Mar 08, 2024 N/A pytest<9,>=7 @@ -8896,7 +8896,7 @@ This list contains 1411 plugins. *status*: N/A, *requires*: pytest (>=5.3.5) - Sycronise pytest results to Jira RMsis + Synchronize pytest results to Jira RMsis :pypi:`pytest-rng` *last release*: Aug 08, 2019, From 6414d1a5a237306300f9dff27b78e201673c3385 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:07:01 -0500 Subject: [PATCH 68/76] spelling: than Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/announce/release-2.6.0.rst | 2 +- doc/en/changelog.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/en/announce/release-2.6.0.rst b/doc/en/announce/release-2.6.0.rst index 56fbd6cc1e4..c00df585738 100644 --- a/doc/en/announce/release-2.6.0.rst +++ b/doc/en/announce/release-2.6.0.rst @@ -73,7 +73,7 @@ holger krekel - cleanup setup.py a bit and specify supported versions. Thanks Jurko Gospodnetic for the PR. -- change XPASS colour to yellow rather then red when tests are run +- change XPASS colour to yellow rather than red when tests are run with -v. - fix issue473: work around mock putting an unbound method into a class diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index c39267200c2..48adb30cae3 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -8534,7 +8534,7 @@ time or change existing behaviors in order to make them less surprising/more use - cleanup setup.py a bit and specify supported versions. Thanks Jurko Gospodnetic for the PR. -- change XPASS colour to yellow rather then red when tests are run +- change XPASS colour to yellow rather than red when tests are run with -v. - fix issue473: work around mock putting an unbound method into a class From 0b0ce2d03afe234a1ac7f03eec63968dfd32aef7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:34:42 -0400 Subject: [PATCH 69/76] spelling: thanks Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 48adb30cae3..2b24cfce0b5 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -8242,7 +8242,7 @@ time or change existing behaviors in order to make them less surprising/more use - fix issue854: autouse yield_fixtures defined as class members of unittest.TestCase subclasses now work as expected. - Thannks xmo-odoo for the report and Bruno Oliveira for the PR. + Thanks xmo-odoo for the report and Bruno Oliveira for the PR. - fix issue833: --fixtures now shows all fixtures of collected test files, instead of just the fixtures declared on the first one. From cfcd16f83faa261a57d5a69e13064a79c6866858 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:05:09 -0500 Subject: [PATCH 70/76] spelling: that Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/logging/test_fixture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/logging/test_fixture.py b/testing/logging/test_fixture.py index 7ccafa28784..6ca533d9ee6 100644 --- a/testing/logging/test_fixture.py +++ b/testing/logging/test_fixture.py @@ -363,7 +363,7 @@ def test_log_level_override(request, caplog): ) result = pytester.runpytest() - # make sure that that we get a '0' exit code for the testsuite + # make sure that we get a '0' exit code for the testsuite assert result.ret == 0 From b9176faff7fa88960c4a7f593d78b4a99f2f1f9d Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 01:05:29 -0500 Subject: [PATCH 71/76] spelling: the Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/hookspec.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index a3c29c0f0af..6c7abdb9843 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -627,7 +627,7 @@ def pytest_runtest_protocol( - ``pytest_runtest_logreport(report)`` - ``pytest_exception_interact(call, report)`` if an interactive exception occurred - - Call phase, if the the setup passed and the ``setuponly`` pytest option is not set: + - Call phase, if the setup passed and the ``setuponly`` pytest option is not set: - ``call = pytest_runtest_call(item)`` (wrapped in ``CallInfo(when="call")``) - ``report = pytest_runtest_makereport(item, call)`` - ``pytest_runtest_logreport(report)`` From adbe684ee7692a927429013e9cd2497818456b34 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Tue, 12 Mar 2024 08:36:40 -0400 Subject: [PATCH 72/76] spelling: torn_down Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/test_unittest.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testing/test_unittest.py b/testing/test_unittest.py index 9ecb548eeec..da708033a94 100644 --- a/testing/test_unittest.py +++ b/testing/test_unittest.py @@ -299,7 +299,7 @@ def test_func2(self): @classmethod def tearDownClass(cls): cls.x -= 1 - def test_teareddown(): + def test_torn_down(): assert MyTestCase.x == 0 """ ) @@ -346,7 +346,7 @@ def test_func2(self): assert self.x == 1 def teardown_class(cls): cls.x -= 1 - def test_teareddown(): + def test_torn_down(): assert MyTestCase.x == 0 """ ) @@ -881,7 +881,7 @@ def test_method1(self): def tearDownClass(cls): cls.x = 1 - def test_not_teareddown(): + def test_not_torn_down(): assert TestFoo.x == 0 """ From 607cc886fad8e41e28b1eb9e00dcf95771b9b7c7 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:36:31 -0400 Subject: [PATCH 73/76] spelling: unaffected Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- doc/en/changelog.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 2b24cfce0b5..bf64cbf4caa 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -1345,7 +1345,7 @@ Breaking Changes - `#7259 `_: The :ref:`Node.reportinfo() ` function first return value type has been expanded from `py.path.local | str` to `os.PathLike[str] | str`. Most plugins which refer to `reportinfo()` only define it as part of a custom :class:`pytest.Item` implementation. - Since `py.path.local` is an `os.PathLike[str]`, these plugins are unaffacted. + Since `py.path.local` is an `os.PathLike[str]`, these plugins are unaffected. Plugins and users which call `reportinfo()`, use the first return value and interact with it as a `py.path.local`, would need to adjust by calling `py.path.local(fspath)`. Although preferably, avoid the legacy `py.path.local` and use `pathlib.Path`, or use `item.location` or `item.path`, instead. From eb387a19f658678be8134de87d19338d53d0e66e Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Sun, 10 Mar 2024 22:36:36 -0400 Subject: [PATCH 74/76] spelling: unavailable Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/_py/error.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/_py/error.py b/src/_pytest/_py/error.py index 68f1eed7ec0..ab3a4ed318e 100644 --- a/src/_pytest/_py/error.py +++ b/src/_pytest/_py/error.py @@ -41,7 +41,7 @@ def __str__(self) -> str: 3: errno.ENOENT, 17: errno.EEXIST, 18: errno.EXDEV, - 13: errno.EBUSY, # empty cd drive, but ENOMEDIUM seems unavailiable + 13: errno.EBUSY, # empty cd drive, but ENOMEDIUM seems unavailable 22: errno.ENOTDIR, 20: errno.ENOTDIR, 267: errno.ENOTDIR, From a72f4826da6a23a94d08f3ca240f104341ce80c6 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 11 Mar 2024 08:49:19 -0400 Subject: [PATCH 75/76] spelling: undoes Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- testing/logging/test_fixture.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/logging/test_fixture.py b/testing/logging/test_fixture.py index 6ca533d9ee6..f8ecf4fd1d4 100644 --- a/testing/logging/test_fixture.py +++ b/testing/logging/test_fixture.py @@ -117,7 +117,7 @@ def test2(caplog): result.stdout.no_fnmatch_line("*log from test2*") -def test_change_level_undos_handler_level(pytester: Pytester) -> None: +def test_change_level_undoes_handler_level(pytester: Pytester) -> None: """Ensure that 'set_level' is undone after the end of the test (handler). Issue #7569. Tests the handler level specifically. From c20f5448ca370b427b958caf2e336f4b034688b8 Mon Sep 17 00:00:00 2001 From: Josh Soref <2119212+jsoref@users.noreply.github.com> Date: Mon, 11 Mar 2024 08:47:21 -0400 Subject: [PATCH 76/76] spelling: visibility Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com> --- src/_pytest/fixtures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index 465f61473ff..02982e0f84e 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -1680,7 +1680,7 @@ def parsefactories( If `node_or_object` is a collection node (with an underlying Python object), the node's object is traversed and the node's nodeid is used to - determine the fixtures' visibilty. `nodeid` must not be specified in + determine the fixtures' visibility. `nodeid` must not be specified in this case. If `node_or_object` is an object (e.g. a plugin), the object is