From ccfd43ed17c09754c54d2c05c4fe0de7f28010c9 Mon Sep 17 00:00:00 2001 From: "Kian-Meng, Ang" Date: Sat, 18 Dec 2021 12:19:55 +0800 Subject: [PATCH 1/3] Fix typos --- AUTHORS | 1 + doc/en/announce/release-2.5.0.rst | 2 +- doc/en/changelog.rst | 14 ++++++------ doc/en/history.rst | 2 +- doc/en/how-to/fixtures.rst | 2 +- doc/en/how-to/output.rst | 6 +++--- doc/en/how-to/skipping.rst | 2 +- doc/en/reference/fixtures.rst | 2 +- doc/en/reference/plugin_list.rst | 36 +++++++++++++++---------------- src/_pytest/_code/code.py | 2 +- src/_pytest/assertion/rewrite.py | 2 +- src/_pytest/assertion/util.py | 2 +- src/_pytest/config/__init__.py | 2 +- src/_pytest/config/compat.py | 2 +- src/_pytest/junitxml.py | 2 +- src/_pytest/mark/expression.py | 2 +- src/_pytest/pytester.py | 2 +- src/_pytest/python.py | 2 +- testing/acceptance_test.py | 2 +- testing/code/test_source.py | 2 +- testing/test_compat.py | 4 ++-- testing/test_config.py | 4 ++-- testing/test_doctest.py | 4 ++-- testing/test_runner.py | 2 +- testing/test_stash.py | 2 +- testing/test_warnings.py | 4 ++-- tox.ini | 4 ++-- 27 files changed, 57 insertions(+), 56 deletions(-) diff --git a/AUTHORS b/AUTHORS index 25b55e5aed2..9413f9c2e74 100644 --- a/AUTHORS +++ b/AUTHORS @@ -185,6 +185,7 @@ Katerina Koukiou Keri Volans Kevin Cox Kevin J. Foley +Kian-Meng Ang Kodi B. Arfer Kostis Anagnostopoulos Kristoffer Nordström diff --git a/doc/en/announce/release-2.5.0.rst b/doc/en/announce/release-2.5.0.rst index bc83fdc122c..c6cdcdd8a83 100644 --- a/doc/en/announce/release-2.5.0.rst +++ b/doc/en/announce/release-2.5.0.rst @@ -11,7 +11,7 @@ clear information about the circumstances and a simple example which reproduces the problem. The issue tracker is of course not empty now. We have many remaining -"enhacement" issues which we'll hopefully can tackle in 2014 with your +"enhancement" issues which we'll hopefully can tackle in 2014 with your help. For those who use older Python versions, please note that pytest is not diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index c5ccc75e3af..15ac02d83ae 100644 --- a/doc/en/changelog.rst +++ b/doc/en/changelog.rst @@ -538,7 +538,7 @@ Bug Fixes the ``tmp_path``/``tmpdir`` fixture). Now the directories are created with private permissions. - pytest used to silenty use a pre-existing ``/tmp/pytest-of-`` directory, + pytest used to silently use a pre-existing ``/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. @@ -1304,7 +1304,7 @@ Improvements is not displayed by default for passing tests. This change makes the mistake visible during testing. - You may supress this behavior temporarily or permanently by setting + You may suppress this behavior temporarily or permanently by setting ``logging.raiseExceptions = False``. @@ -1759,7 +1759,7 @@ Bug Fixes it was swallowed and ignored (regression in pytest 5.1.0). -- :issue:`6801`: Do not display empty lines inbetween traceback for unexpected exceptions with doctests. +- :issue:`6801`: Do not display empty lines in between traceback for unexpected exceptions with doctests. - :issue:`6802`: The :fixture:`testdir fixture ` works within doctests now. @@ -4628,7 +4628,7 @@ Bug Fixes - Fixed a bug where stdout and stderr were logged twice by junitxml when a test was marked xfail. (:issue:`3491`) -- Fix ``usefixtures`` mark applyed to unittest tests by correctly instantiating +- Fix ``usefixtures`` mark applied to unittest tests by correctly instantiating ``FixtureInfo``. (:issue:`3498`) - Fix assertion rewriter compatibility with libraries that monkey patch @@ -8009,7 +8009,7 @@ Bug fixes: or through plugin hooks. Also introduce a "--strict" option which will treat unregistered markers as errors allowing to avoid typos and maintain a well described set of markers - for your test suite. See exaples at http://pytest.org/en/stable/how-to/mark.html + for your test suite. See examples at http://pytest.org/en/stable/how-to/mark.html and its links. - issue50: introduce "-m marker" option to select tests based on markers (this is a stricter and more predictable version of '-k' in that "-m" @@ -8321,7 +8321,7 @@ Bug fixes: - fix issue57 -f|--looponfail to work with xpassing tests (thanks Ronny) - fix issue92 collectonly reporter and --pastebin (thanks Benjamin Peterson) - fix py.code.compile(source) to generate unique filenames -- fix assertion re-interp problems on PyPy, by defering code +- fix assertion re-interp problems on PyPy, by deferring code compilation to the (overridable) Frame.eval class. (thanks Amaury Forgeot) - fix py.path.local.pyimport() to work with directories - streamline py.path.local.mkdtemp implementation and usage @@ -8395,7 +8395,7 @@ Bug fixes: - improve support for raises and other dynamically compiled code by manipulating python's linecache.cache instead of the previous rather hacky way of creating custom code objects. This makes - it seemlessly work on Jython and PyPy where it previously didn't. + it seamlessly work on Jython and PyPy where it previously didn't. - fix issue96: make capturing more resilient against Control-C interruptions (involved somewhat substantial refactoring diff --git a/doc/en/history.rst b/doc/en/history.rst index 796a42486ca..bb5aa493022 100644 --- a/doc/en/history.rst +++ b/doc/en/history.rst @@ -139,7 +139,7 @@ project: which adds ``pytest`` (rather than ``py.test``) as the recommended command-line entry point -Due to this history, it's diffcult to answer the question when pytest was started. +Due to this history, it's difficult to answer the question when pytest was started. It depends what point should really be seen as the start of it all. One possible interpretation is to pick Europython 2004, i.e. around June/July 2004. diff --git a/doc/en/how-to/fixtures.rst b/doc/en/how-to/fixtures.rst index 08013877455..a63d30d4faa 100644 --- a/doc/en/how-to/fixtures.rst +++ b/doc/en/how-to/fixtures.rst @@ -1267,7 +1267,7 @@ So let's just do another run: ========================= short test summary info ========================== FAILED test_module.py::test_ehlo[smtp.gmail.com] - assert 0 FAILED test_module.py::test_noop[smtp.gmail.com] - assert 0 - FAILED test_module.py::test_ehlo[mail.python.org] - AssertionError: asser... + FAILED test_module.py::test_ehlo[mail.python.org] - AssertionError: assert... FAILED test_module.py::test_noop[mail.python.org] - assert 0 4 failed in 0.12s diff --git a/doc/en/how-to/output.rst b/doc/en/how-to/output.rst index 4b90988f49d..db494b176a5 100644 --- a/doc/en/how-to/output.rst +++ b/doc/en/how-to/output.rst @@ -111,7 +111,7 @@ Executing pytest normally gives us this output (we are skipping the header to fo test_verbosity_example.py:19: AssertionError ========================= short test summary info ========================== - FAILED test_verbosity_example.py::test_words_fail - AssertionError: asser... + FAILED test_verbosity_example.py::test_words_fail - AssertionError: assert... FAILED test_verbosity_example.py::test_numbers_fail - AssertionError: ass... FAILED test_verbosity_example.py::test_long_text_fail - AssertionError: a... ======================= 3 failed, 1 passed in 0.12s ======================== @@ -180,7 +180,7 @@ Now we can increase pytest's verbosity: test_verbosity_example.py:19: AssertionError ========================= short test summary info ========================== - FAILED test_verbosity_example.py::test_words_fail - AssertionError: asser... + FAILED test_verbosity_example.py::test_words_fail - AssertionError: assert... FAILED test_verbosity_example.py::test_numbers_fail - AssertionError: ass... FAILED test_verbosity_example.py::test_long_text_fail - AssertionError: a... ======================= 3 failed, 1 passed in 0.12s ======================== @@ -250,7 +250,7 @@ Now if we increase verbosity even more: test_verbosity_example.py:19: AssertionError ========================= short test summary info ========================== - FAILED test_verbosity_example.py::test_words_fail - AssertionError: asser... + FAILED test_verbosity_example.py::test_words_fail - AssertionError: assert... FAILED test_verbosity_example.py::test_numbers_fail - AssertionError: ass... FAILED test_verbosity_example.py::test_long_text_fail - AssertionError: a... ======================= 3 failed, 1 passed in 0.12s ======================== diff --git a/doc/en/how-to/skipping.rst b/doc/en/how-to/skipping.rst index 9b74628d59f..e2f59c77ae8 100644 --- a/doc/en/how-to/skipping.rst +++ b/doc/en/how-to/skipping.rst @@ -369,7 +369,7 @@ Here is a simple test file with the several usages: Running it with the report-on-xfail option gives this output: -.. FIXME: Use $ instead of ! again to reenable regendoc once it's fixed: +.. FIXME: Use $ instead of ! again to re-enable regendoc once it's fixed: https://github.com/pytest-dev/pytest/issues/8807 .. code-block:: pytest diff --git a/doc/en/reference/fixtures.rst b/doc/en/reference/fixtures.rst index 35b79021209..da2c5e009c3 100644 --- a/doc/en/reference/fixtures.rst +++ b/doc/en/reference/fixtures.rst @@ -208,7 +208,7 @@ the one defined in ``tests/test_top.py`` would be unavailable to it because it would have to step down a level (step inside a circle) to find it. The first fixture the test finds is the one that will be used, so -:ref:`fixtures can be overriden ` if you need to change or +:ref:`fixtures can be overridden ` if you need to change or extend what one does for a particular scope. You can also use the ``conftest.py`` file to implement diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 843cfcd5405..4480349cbd5 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -23,7 +23,7 @@ This list contains 969 plugins. :pypi:`pytest-addons-test` 用于测试pytest的插件 Aug 02, 2021 N/A pytest (>=6.2.4,<7.0.0) :pypi:`pytest-adf` Pytest plugin for writing Azure Data Factory integration tests May 10, 2021 4 - Beta pytest (>=3.5.0) :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-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 Oct 20, 2021 4 - Beta pytest :pypi:`pytest-aiofiles` pytest fixtures for writing aiofiles tests with pyfakefs May 14, 2017 5 - Production/Stable N/A @@ -56,7 +56,7 @@ This list contains 969 plugins. :pypi:`pytest-appengine` AppEngine integration that works well with pytest-django Feb 27, 2017 N/A N/A :pypi:`pytest-appium` Pytest plugin for appium Dec 05, 2019 N/A N/A :pypi:`pytest-approvaltests` A plugin to use approvaltests with pytest Feb 07, 2021 4 - Beta pytest (>=3.5.0) - :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 Dec 06, 2018 4 - Beta pytest :pypi:`pytest-asgi-server` Convenient ASGI client/server fixtures for Pytest Dec 12, 2020 N/A pytest (>=5.4.1) :pypi:`pytest-asptest` test Answer Set Programming programs Apr 28, 2018 4 - Beta N/A @@ -77,7 +77,7 @@ This list contains 969 plugins. :pypi:`pytest-austin` Austin plugin for pytest Oct 11, 2020 4 - Beta N/A :pypi:`pytest-autochecklog` automatically check condition and log all the checks Apr 25, 2015 4 - Beta N/A :pypi:`pytest-automation` pytest plugin for building a test suite, using YAML files to extend pytest parameterize functionality. Oct 01, 2021 N/A pytest - :pypi:`pytest-automock` Pytest plugin for automatical mocks creation Apr 22, 2020 N/A pytest ; extra == 'dev' + :pypi:`pytest-automock` Pytest plugin for automatically mocks creation Apr 22, 2020 N/A pytest ; extra == 'dev' :pypi:`pytest-auto-parametrize` pytest plugin: avoid repeating arguments in parametrize Oct 02, 2016 3 - Alpha N/A :pypi:`pytest-autotest` This fixture provides a configured "driver" for Android Automated Testing, using uiautomator2. Aug 25, 2021 N/A pytest :pypi:`pytest-avoidance` Makes pytest skip tests that don not need rerunning May 23, 2019 4 - Beta pytest (>=3.5.0) @@ -172,7 +172,7 @@ This list contains 969 plugins. :pypi:`pytest-contexts` A plugin to run tests written with the Contexts framework using pytest May 19, 2021 4 - Beta N/A :pypi:`pytest-cookies` The pytest plugin for your Cookiecutter templates. 🍪 May 24, 2021 5 - Production/Stable pytest (>=3.3.0) :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. Oct 04, 2021 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 @@ -372,7 +372,7 @@ This list contains 969 plugins. :pypi:`pytest-focus` A pytest plugin that alerts user of failed test cases with screen notifications May 04, 2019 4 - Beta pytest :pypi:`pytest-forcefail` py.test plugin to make the test failing regardless of pytest.mark.xfail May 15, 2018 4 - Beta N/A :pypi:`pytest-forward-compatability` A name to avoid typosquating pytest-foward-compatibility Sep 06, 2020 N/A N/A - :pypi:`pytest-forward-compatibility` A pytest plugin to shim pytest commandline options for fowards compatibility Sep 29, 2020 N/A N/A + :pypi:`pytest-forward-compatibility` A pytest plugin to shim pytest commandline options for forwards compatibility Sep 29, 2020 N/A N/A :pypi:`pytest-freezegun` Wrap tests with fixtures in freeze_time Jul 19, 2020 4 - Beta pytest (>=3.0.0) :pypi:`pytest-freeze-reqs` Check if requirement files are frozen Apr 29, 2021 N/A N/A :pypi:`pytest-frozen-uuids` Deterministically frozen UUID's for your tests Dec 08, 2021 N/A pytest (>=3.0) @@ -432,7 +432,7 @@ This list contains 969 plugins. :pypi:`pytest-hypo-25` help hypo module for pytest Jan 12, 2020 3 - Alpha N/A :pypi:`pytest-ibutsu` A plugin to sent pytest results to an Ibutsu server Dec 15, 2021 4 - Beta pytest :pypi:`pytest-icdiff` use icdiff for better error messages in pytest assertions Apr 08, 2020 4 - Beta 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 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-idempotent` Pytest plugin for testing function idempotence. Nov 26, 2021 N/A N/A :pypi:`pytest-ignore-flaky` ignore failures from flaky tests (pytest plugin) Apr 23, 2021 5 - Production/Stable N/A :pypi:`pytest-image-diff` Jul 28, 2021 3 - Alpha pytest @@ -473,7 +473,7 @@ This list contains 969 plugins. :pypi:`pytest-kafkavents` A plugin to send pytest events to Kafka Sep 08, 2021 4 - Beta pytest :pypi:`pytest-kind` Kubernetes test support with KIND for pytest Jan 24, 2021 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-krtech-common` pytest krtech common library Nov 28, 2016 4 - Beta N/A :pypi:`pytest-kwparametrize` Alternate syntax for @pytest.mark.parametrize with test cases as dictionaries and default value fallbacks Jan 22, 2021 N/A pytest (>=6) @@ -505,7 +505,7 @@ This list contains 969 plugins. :pypi:`pytest-logfest` Pytest plugin providing three logger fixtures with basic or full writing to log files Jul 21, 2019 4 - Beta pytest (>=3.5.0) :pypi:`pytest-logger` Plugin configuring handlers for loggers from Python logging module. Jul 25, 2019 4 - Beta pytest (>=3.2) :pypi:`pytest-logging` Configures logging and allows tweaking the log level with a py.test flag Nov 04, 2015 4 - Beta N/A - :pypi:`pytest-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-manual-marker` pytest marker for marking manual tests Oct 11, 2021 3 - Alpha pytest (>=6) :pypi:`pytest-markdown` Test your markdown docs with pytest Jan 15, 2021 4 - Beta pytest (>=6.0.1,<7.0.0) :pypi:`pytest-marker-bugzilla` py.test bugzilla integration plugin, using markers Jan 09, 2020 N/A N/A @@ -953,7 +953,7 @@ This list contains 969 plugins. :pypi:`pytest-vyper` Plugin for the vyper smart contract language. May 28, 2020 2 - Pre-Alpha N/A :pypi:`pytest-wa-e2e-plugin` Pytest plugin for testing whatsapp bots with end to end tests Feb 18, 2020 4 - Beta pytest (>=3.5.0) :pypi:`pytest-watch` Local continuous test runner with pytest and watchdog. May 20, 2018 N/A N/A - :pypi:`pytest-watcher` Continiously runs pytest on changes in \*.py files Sep 18, 2021 3 - Alpha N/A + :pypi:`pytest-watcher` Continuously runs pytest on changes in \*.py files Sep 18, 2021 3 - Alpha N/A :pypi:`pytest-wdl` Pytest plugin for testing WDL workflows. Nov 17, 2020 5 - Production/Stable N/A :pypi:`pytest-webdriver` Selenium webdriver fixture for py.test May 28, 2019 5 - Production/Stable pytest :pypi:`pytest-wetest` Welian API Automation test framework pytest plugin Nov 10, 2018 4 - Beta N/A @@ -1032,7 +1032,7 @@ This list contains 969 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, @@ -1263,7 +1263,7 @@ This list contains 969 plugins. *status*: 5 - Production/Stable, *requires*: pytest (>=6.2.4) - pyest results colection plugin + pyest results collection plugin :pypi:`pytest-arraydiff` *last release*: Dec 06, 2018, @@ -1410,7 +1410,7 @@ This list contains 969 plugins. *status*: N/A, *requires*: pytest ; extra == 'dev' - Pytest plugin for automatical mocks creation + Pytest plugin for automatically mocks creation :pypi:`pytest-auto-parametrize` *last release*: Oct 02, 2016, @@ -2075,7 +2075,7 @@ This list contains 969 plugins. *status*: 4 - Beta, *requires*: N/A - count erros and send email + count errors and send email :pypi:`pytest-cov` *last release*: Oct 04, 2021, @@ -3475,7 +3475,7 @@ This list contains 969 plugins. *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-freezegun` *last release*: Jul 19, 2020, @@ -3895,7 +3895,7 @@ This list contains 969 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-idempotent` *last release*: Nov 26, 2021, @@ -4182,7 +4182,7 @@ This list contains 969 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, @@ -4406,7 +4406,7 @@ This list contains 969 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-manual-marker` *last release*: Oct 11, 2021, @@ -7542,7 +7542,7 @@ This list contains 969 plugins. *status*: 3 - Alpha, *requires*: N/A - Continiously runs pytest on changes in \*.py files + Continuously runs pytest on changes in \*.py files :pypi:`pytest-wdl` *last release*: Nov 17, 2020, diff --git a/src/_pytest/_code/code.py b/src/_pytest/_code/code.py index b19ee7c64d9..12ce135529c 100644 --- a/src/_pytest/_code/code.py +++ b/src/_pytest/_code/code.py @@ -895,7 +895,7 @@ def _truncate_recursive_traceback( max_frames=max_frames, total=len(traceback), ) - # Type ignored because adding two instaces of a List subtype + # Type ignored because adding two instances of a List subtype # currently incorrectly has type List instead of the subtype. traceback = traceback[:max_frames] + traceback[-max_frames:] # type: ignore else: diff --git a/src/_pytest/assertion/rewrite.py b/src/_pytest/assertion/rewrite.py index 50b367e25ef..e9ecedfaa52 100644 --- a/src/_pytest/assertion/rewrite.py +++ b/src/_pytest/assertion/rewrite.py @@ -513,7 +513,7 @@ def _call_assertion_pass(lineno: int, orig: str, expl: str) -> None: def _check_if_assertion_pass_impl() -> bool: """Check if any plugins implement the pytest_assertion_pass hook - in order not to generate explanation unecessarily (might be expensive).""" + in order not to generate explanation unnecessarily (might be expensive).""" return True if util._assertion_pass else False diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index c26ff90dc53..009a1ec6e72 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -142,7 +142,7 @@ def has_default_eq( First, we check if the object's __eq__ attribute has __code__, if so, we check the equally of the method code filename (__code__.co_filename) - to the default onces generated by the dataclass and attr module + to the default once generated by the dataclass and attr module for dataclasses the default co_filename is , for attrs class, the __eq__ should contain "attrs eq generated" """ # inspired from https://github.com/willmcgugan/rich/blob/07d51ffc1aee6f16bd2e5a25b4e82850fb9ed778/rich/pretty.py#L68 diff --git a/src/_pytest/config/__init__.py b/src/_pytest/config/__init__.py index 4cb22009a06..1bdd8effba2 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -970,7 +970,7 @@ def inipath(self) -> Optional[Path]: def add_cleanup(self, func: Callable[[], None]) -> None: """Add a function to be called when the config object gets out of - use (usually coninciding with pytest_unconfigure).""" + use (usually coinciding with pytest_unconfigure).""" self._cleanup.append(func) def _do_configure(self) -> None: diff --git a/src/_pytest/config/compat.py b/src/_pytest/config/compat.py index 8f82dd9f9d7..ba267d21505 100644 --- a/src/_pytest/config/compat.py +++ b/src/_pytest/config/compat.py @@ -23,7 +23,7 @@ class PathAwareHookProxy: this helper wraps around hook callers until pluggy supports fixingcalls, this one will do - it currently doesnt return full hook caller proxies for fixed hooks, + it currently doesn't return full hook caller proxies for fixed hooks, this may have to be changed later depending on bugs """ diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py index 13688251f6a..4af5fbab0c0 100644 --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -256,7 +256,7 @@ def append_skipped(self, report: TestReport) -> None: def finalize(self) -> None: data = self.to_xml() self.__dict__.clear() - # Type ignored becuase mypy doesn't like overriding a method. + # Type ignored because mypy doesn't like overriding a method. # Also the return value doesn't match... self.to_xml = lambda: data # type: ignore[assignment] diff --git a/src/_pytest/mark/expression.py b/src/_pytest/mark/expression.py index 9d57e944b92..92220d7723a 100644 --- a/src/_pytest/mark/expression.py +++ b/src/_pytest/mark/expression.py @@ -190,7 +190,7 @@ def __len__(self) -> int: class Expression: """A compiled match expression as used by -k and -m. - The expression can be evaulated against different matchers. + The expression can be evaluated against different matchers. """ __slots__ = ("code",) diff --git a/src/_pytest/pytester.py b/src/_pytest/pytester.py index 42e71ff917e..84547535d5f 100644 --- a/src/_pytest/pytester.py +++ b/src/_pytest/pytester.py @@ -1288,7 +1288,7 @@ def collect_by_name( ) -> Optional[Union[Item, Collector]]: """Return the collection node for name from the module collection. - Searchs a module collection node for a collection node matching the + Searches a module collection node for a collection node matching the given name. :param modcol: A module collection node; see :py:meth:`getmodulecol`. diff --git a/src/_pytest/python.py b/src/_pytest/python.py index aa49aa26499..203976f2b33 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -1649,7 +1649,7 @@ def __init__( # this will be redeemed later for mark in callspec.marks: # feel free to cry, this was broken for years before - # and keywords cant fix it per design + # and keywords can't fix it per design self.keywords[mark.name] = mark self.own_markers.extend(normalize_mark_list(callspec.marks)) if keywords: diff --git a/testing/acceptance_test.py b/testing/acceptance_test.py index bfd1fe6e668..8b8d4a4a6ed 100644 --- a/testing/acceptance_test.py +++ b/testing/acceptance_test.py @@ -1281,7 +1281,7 @@ def test_simple(): reason="Windows raises `OSError: [Errno 22] Invalid argument` instead", ) def test_no_brokenpipeerror_message(pytester: Pytester) -> None: - """Ensure that the broken pipe error message is supressed. + """Ensure that the broken pipe error message is suppressed. In some Python versions, it reaches sys.unraisablehook, in others a BrokenPipeError exception is propagated, but either way it prints diff --git a/testing/code/test_source.py b/testing/code/test_source.py index 53202ee27e3..9f7be5e2458 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -484,7 +484,7 @@ def deco_fixture(): src = inspect.getsource(deco_fixture) assert src == " @pytest.fixture\n def deco_fixture():\n assert False\n" - # currenly Source does not unwrap decorators, testing the + # currently Source does not unwrap decorators, testing the # existing behavior here for explicitness, but perhaps we should revisit/change this # in the future assert str(Source(deco_fixture)).startswith("@functools.wraps(function)") diff --git a/testing/test_compat.py b/testing/test_compat.py index 9f48a31d689..8471a1a50f6 100644 --- a/testing/test_compat.py +++ b/testing/test_compat.py @@ -156,11 +156,11 @@ def raise_baseexception(self): @property def raise_exception(self): - raise Exception("exception should be catched") + raise Exception("exception should be caught") @property def raise_fail_outcome(self): - pytest.fail("fail should be catched") + pytest.fail("fail should be caught") def test_helper_failures() -> None: diff --git a/testing/test_config.py b/testing/test_config.py index 4435591164f..26113272a37 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -386,7 +386,7 @@ def pytest_configure(config): pytest.param( """ [some_other_header] - required_plugins = wont be triggered + required_plugins = won't be triggered [pytest] """, "1.5", @@ -807,7 +807,7 @@ def test_confcutdir_check_isdir(self, pytester: Pytester) -> None: with pytest.raises(pytest.UsageError, match=exp_match): pytester.parseconfig("--confcutdir", pytester.path.joinpath("file")) with pytest.raises(pytest.UsageError, match=exp_match): - pytester.parseconfig("--confcutdir", pytester.path.joinpath("inexistant")) + pytester.parseconfig("--confcutdir", pytester.path.joinpath("inexistent")) p = pytester.mkdir("dir") config = pytester.parseconfig("--confcutdir", p) diff --git a/testing/test_doctest.py b/testing/test_doctest.py index ca215e070fa..e85f44f93f4 100644 --- a/testing/test_doctest.py +++ b/testing/test_doctest.py @@ -80,7 +80,7 @@ def test_collect_module_two_doctest_no_modulelevel( '# Empty' def my_func(): ">>> magic = 42 " - def unuseful(): + def useless(): ''' # This is a function # >>> # it doesn't have any doctest @@ -564,7 +564,7 @@ def my_func(): >>> magic - 42 0 ''' - def unuseful(): + def useless(): pass def another(): ''' diff --git a/testing/test_runner.py b/testing/test_runner.py index a34cd98f964..2e2c462d978 100644 --- a/testing/test_runner.py +++ b/testing/test_runner.py @@ -287,7 +287,7 @@ def teardown_class(cls): def test_func(): import sys - # on python2 exc_info is keept till a function exits + # on python2 exc_info is kept till a function exits # so we would end up calling test functions while # sys.exc_info would return the indexerror # from guessing the lastitem diff --git a/testing/test_stash.py b/testing/test_stash.py index bb294f5da35..2c9df4832e4 100644 --- a/testing/test_stash.py +++ b/testing/test_stash.py @@ -56,7 +56,7 @@ def test_stash() -> None: with pytest.raises(AttributeError): stash.foo = "nope" # type: ignore[attr-defined] - # No interaction with anoter stash. + # No interaction with another stash. stash2 = Stash() key3 = StashKey[int]() assert key2 not in stash2 diff --git a/testing/test_warnings.py b/testing/test_warnings.py index 3ae9ea33181..734e1ebb5cd 100644 --- a/testing/test_warnings.py +++ b/testing/test_warnings.py @@ -289,7 +289,7 @@ def pytest_warning_recorded(self, warning_message, when, nodeid, location): assert collected_result[2] == expected_result[2], str(collected) # NOTE: collected_result[3] is location, which differs based on the platform you are on - # thus, the best we can do here is assert the types of the paremeters match what we expect + # thus, the best we can do here is assert the types of the parameters match what we expect # and not try and preload it in the expected array if collected_result[3] is not None: assert type(collected_result[3][0]) is str, str(collected) @@ -708,7 +708,7 @@ def test_issue4445_preparse(self, pytester: Pytester, capwarn) -> None: pytester.parseconfig("--help") # with stacklevel=2 the warning should originate from config._preparse and is - # thrown by an errorneous conftest.py + # thrown by an erroneous conftest.py assert len(capwarn.captured) == 1 warning, location = capwarn.captured.pop() file, _, func = location diff --git a/tox.ini b/tox.ini index 9d26051ebb7..6d30e0b0dca 100644 --- a/tox.ini +++ b/tox.ini @@ -130,7 +130,7 @@ commands = {envpython} tox_run.py [testenv:release] -decription = do a release, required posarg of the version number +description = do a release, required posarg of the version number basepython = python3 usedevelop = True passenv = * @@ -144,7 +144,7 @@ deps = commands = python scripts/release.py {posargs} [testenv:prepare-release-pr] -decription = prepare a release PR from a manual trigger in GitHub actions +description = prepare a release PR from a manual trigger in GitHub actions usedevelop = {[testenv:release]usedevelop} passenv = {[testenv:release]passenv} deps = {[testenv:release]deps} From 86d797504efec7f759cafb674e24d1b9961afbed Mon Sep 17 00:00:00 2001 From: "Kian-Meng, Ang" Date: Thu, 23 Dec 2021 19:21:16 +0800 Subject: [PATCH 2/3] Review fixes --- doc/en/how-to/fixtures.rst | 2 +- doc/en/reference/plugin_list.rst | 36 ++++++++++++++++---------------- src/_pytest/assertion/util.py | 2 +- testing/test_config.py | 2 +- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/doc/en/how-to/fixtures.rst b/doc/en/how-to/fixtures.rst index a63d30d4faa..08013877455 100644 --- a/doc/en/how-to/fixtures.rst +++ b/doc/en/how-to/fixtures.rst @@ -1267,7 +1267,7 @@ So let's just do another run: ========================= short test summary info ========================== FAILED test_module.py::test_ehlo[smtp.gmail.com] - assert 0 FAILED test_module.py::test_noop[smtp.gmail.com] - assert 0 - FAILED test_module.py::test_ehlo[mail.python.org] - AssertionError: assert... + FAILED test_module.py::test_ehlo[mail.python.org] - AssertionError: asser... FAILED test_module.py::test_noop[mail.python.org] - assert 0 4 failed in 0.12s diff --git a/doc/en/reference/plugin_list.rst b/doc/en/reference/plugin_list.rst index 4480349cbd5..843cfcd5405 100644 --- a/doc/en/reference/plugin_list.rst +++ b/doc/en/reference/plugin_list.rst @@ -23,7 +23,7 @@ This list contains 969 plugins. :pypi:`pytest-addons-test` 用于测试pytest的插件 Aug 02, 2021 N/A pytest (>=6.2.4,<7.0.0) :pypi:`pytest-adf` Pytest plugin for writing Azure Data Factory integration tests May 10, 2021 4 - Beta pytest (>=3.5.0) :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-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-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-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 Oct 20, 2021 4 - Beta pytest :pypi:`pytest-aiofiles` pytest fixtures for writing aiofiles tests with pyfakefs May 14, 2017 5 - Production/Stable N/A @@ -56,7 +56,7 @@ This list contains 969 plugins. :pypi:`pytest-appengine` AppEngine integration that works well with pytest-django Feb 27, 2017 N/A N/A :pypi:`pytest-appium` Pytest plugin for appium Dec 05, 2019 N/A N/A :pypi:`pytest-approvaltests` A plugin to use approvaltests with pytest Feb 07, 2021 4 - Beta pytest (>=3.5.0) - :pypi:`pytest-argus` pyest results collection plugin Jun 24, 2021 5 - Production/Stable pytest (>=6.2.4) + :pypi:`pytest-argus` pyest results colection plugin Jun 24, 2021 5 - Production/Stable pytest (>=6.2.4) :pypi:`pytest-arraydiff` pytest plugin to help with comparing array output from tests Dec 06, 2018 4 - Beta pytest :pypi:`pytest-asgi-server` Convenient ASGI client/server fixtures for Pytest Dec 12, 2020 N/A pytest (>=5.4.1) :pypi:`pytest-asptest` test Answer Set Programming programs Apr 28, 2018 4 - Beta N/A @@ -77,7 +77,7 @@ This list contains 969 plugins. :pypi:`pytest-austin` Austin plugin for pytest Oct 11, 2020 4 - Beta N/A :pypi:`pytest-autochecklog` automatically check condition and log all the checks Apr 25, 2015 4 - Beta N/A :pypi:`pytest-automation` pytest plugin for building a test suite, using YAML files to extend pytest parameterize functionality. Oct 01, 2021 N/A pytest - :pypi:`pytest-automock` Pytest plugin for automatically mocks creation Apr 22, 2020 N/A pytest ; extra == 'dev' + :pypi:`pytest-automock` Pytest plugin for automatical mocks creation Apr 22, 2020 N/A pytest ; extra == 'dev' :pypi:`pytest-auto-parametrize` pytest plugin: avoid repeating arguments in parametrize Oct 02, 2016 3 - Alpha N/A :pypi:`pytest-autotest` This fixture provides a configured "driver" for Android Automated Testing, using uiautomator2. Aug 25, 2021 N/A pytest :pypi:`pytest-avoidance` Makes pytest skip tests that don not need rerunning May 23, 2019 4 - Beta pytest (>=3.5.0) @@ -172,7 +172,7 @@ This list contains 969 plugins. :pypi:`pytest-contexts` A plugin to run tests written with the Contexts framework using pytest May 19, 2021 4 - Beta N/A :pypi:`pytest-cookies` The pytest plugin for your Cookiecutter templates. 🍪 May 24, 2021 5 - Production/Stable pytest (>=3.3.0) :pypi:`pytest-couchdbkit` py.test extension for per-test couchdb databases using couchdbkit Apr 17, 2012 N/A N/A - :pypi:`pytest-count` count errors and send email Jan 12, 2018 4 - Beta N/A + :pypi:`pytest-count` count erros and send email Jan 12, 2018 4 - Beta N/A :pypi:`pytest-cov` Pytest plugin for measuring coverage. Oct 04, 2021 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 @@ -372,7 +372,7 @@ This list contains 969 plugins. :pypi:`pytest-focus` A pytest plugin that alerts user of failed test cases with screen notifications May 04, 2019 4 - Beta pytest :pypi:`pytest-forcefail` py.test plugin to make the test failing regardless of pytest.mark.xfail May 15, 2018 4 - Beta N/A :pypi:`pytest-forward-compatability` A name to avoid typosquating pytest-foward-compatibility Sep 06, 2020 N/A N/A - :pypi:`pytest-forward-compatibility` A pytest plugin to shim pytest commandline options for forwards compatibility Sep 29, 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-freezegun` Wrap tests with fixtures in freeze_time Jul 19, 2020 4 - Beta pytest (>=3.0.0) :pypi:`pytest-freeze-reqs` Check if requirement files are frozen Apr 29, 2021 N/A N/A :pypi:`pytest-frozen-uuids` Deterministically frozen UUID's for your tests Dec 08, 2021 N/A pytest (>=3.0) @@ -432,7 +432,7 @@ This list contains 969 plugins. :pypi:`pytest-hypo-25` help hypo module for pytest Jan 12, 2020 3 - Alpha N/A :pypi:`pytest-ibutsu` A plugin to sent pytest results to an Ibutsu server Dec 15, 2021 4 - Beta pytest :pypi:`pytest-icdiff` use icdiff for better error messages in pytest assertions Apr 08, 2020 4 - Beta 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-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-idempotent` Pytest plugin for testing function idempotence. Nov 26, 2021 N/A N/A :pypi:`pytest-ignore-flaky` ignore failures from flaky tests (pytest plugin) Apr 23, 2021 5 - Production/Stable N/A :pypi:`pytest-image-diff` Jul 28, 2021 3 - Alpha pytest @@ -473,7 +473,7 @@ This list contains 969 plugins. :pypi:`pytest-kafkavents` A plugin to send pytest events to Kafka Sep 08, 2021 4 - Beta pytest :pypi:`pytest-kind` Kubernetes test support with KIND for pytest Jan 24, 2021 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 automatically 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 automaticly 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-krtech-common` pytest krtech common library Nov 28, 2016 4 - Beta N/A :pypi:`pytest-kwparametrize` Alternate syntax for @pytest.mark.parametrize with test cases as dictionaries and default value fallbacks Jan 22, 2021 N/A pytest (>=6) @@ -505,7 +505,7 @@ This list contains 969 plugins. :pypi:`pytest-logfest` Pytest plugin providing three logger fixtures with basic or full writing to log files Jul 21, 2019 4 - Beta pytest (>=3.5.0) :pypi:`pytest-logger` Plugin configuring handlers for loggers from Python logging module. Jul 25, 2019 4 - Beta pytest (>=3.2) :pypi:`pytest-logging` Configures logging and allows tweaking the log level with a py.test flag Nov 04, 2015 4 - Beta N/A - :pypi:`pytest-log-report` Package for creating a pytest test run report Dec 26, 2019 N/A N/A + :pypi:`pytest-log-report` Package for creating a pytest test run reprot Dec 26, 2019 N/A N/A :pypi:`pytest-manual-marker` pytest marker for marking manual tests Oct 11, 2021 3 - Alpha pytest (>=6) :pypi:`pytest-markdown` Test your markdown docs with pytest Jan 15, 2021 4 - Beta pytest (>=6.0.1,<7.0.0) :pypi:`pytest-marker-bugzilla` py.test bugzilla integration plugin, using markers Jan 09, 2020 N/A N/A @@ -953,7 +953,7 @@ This list contains 969 plugins. :pypi:`pytest-vyper` Plugin for the vyper smart contract language. May 28, 2020 2 - Pre-Alpha N/A :pypi:`pytest-wa-e2e-plugin` Pytest plugin for testing whatsapp bots with end to end tests Feb 18, 2020 4 - Beta pytest (>=3.5.0) :pypi:`pytest-watch` Local continuous test runner with pytest and watchdog. May 20, 2018 N/A N/A - :pypi:`pytest-watcher` Continuously runs pytest on changes in \*.py files Sep 18, 2021 3 - Alpha N/A + :pypi:`pytest-watcher` Continiously runs pytest on changes in \*.py files Sep 18, 2021 3 - Alpha N/A :pypi:`pytest-wdl` Pytest plugin for testing WDL workflows. Nov 17, 2020 5 - Production/Stable N/A :pypi:`pytest-webdriver` Selenium webdriver fixture for py.test May 28, 2019 5 - Production/Stable pytest :pypi:`pytest-wetest` Welian API Automation test framework pytest plugin Nov 10, 2018 4 - Beta N/A @@ -1032,7 +1032,7 @@ This list contains 969 plugins. *status*: N/A, *requires*: N/A - 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. + 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. :pypi:`pytest-aggreport` *last release*: Mar 07, 2021, @@ -1263,7 +1263,7 @@ This list contains 969 plugins. *status*: 5 - Production/Stable, *requires*: pytest (>=6.2.4) - pyest results collection plugin + pyest results colection plugin :pypi:`pytest-arraydiff` *last release*: Dec 06, 2018, @@ -1410,7 +1410,7 @@ This list contains 969 plugins. *status*: N/A, *requires*: pytest ; extra == 'dev' - Pytest plugin for automatically mocks creation + Pytest plugin for automatical mocks creation :pypi:`pytest-auto-parametrize` *last release*: Oct 02, 2016, @@ -2075,7 +2075,7 @@ This list contains 969 plugins. *status*: 4 - Beta, *requires*: N/A - count errors and send email + count erros and send email :pypi:`pytest-cov` *last release*: Oct 04, 2021, @@ -3475,7 +3475,7 @@ This list contains 969 plugins. *status*: N/A, *requires*: N/A - A pytest plugin to shim pytest commandline options for forwards compatibility + A pytest plugin to shim pytest commandline options for fowards compatibility :pypi:`pytest-freezegun` *last release*: Jul 19, 2020, @@ -3895,7 +3895,7 @@ This list contains 969 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 running 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 runnig pytest inside IDA and by mocking idapython api :pypi:`pytest-idempotent` *last release*: Nov 26, 2021, @@ -4182,7 +4182,7 @@ This list contains 969 plugins. *status*: N/A, *requires*: N/A - A pytest plugin that can automatically skip test case based on dependence info calculated by trace + A pytest plugin that can automaticly skip test case based on dependence info calculated by trace :pypi:`pytest-konira` *last release*: Oct 09, 2011, @@ -4406,7 +4406,7 @@ This list contains 969 plugins. *status*: N/A, *requires*: N/A - Package for creating a pytest test run report + Package for creating a pytest test run reprot :pypi:`pytest-manual-marker` *last release*: Oct 11, 2021, @@ -7542,7 +7542,7 @@ This list contains 969 plugins. *status*: 3 - Alpha, *requires*: N/A - Continuously runs pytest on changes in \*.py files + Continiously runs pytest on changes in \*.py files :pypi:`pytest-wdl` *last release*: Nov 17, 2020, diff --git a/src/_pytest/assertion/util.py b/src/_pytest/assertion/util.py index 009a1ec6e72..14512a7c5ca 100644 --- a/src/_pytest/assertion/util.py +++ b/src/_pytest/assertion/util.py @@ -142,7 +142,7 @@ def has_default_eq( First, we check if the object's __eq__ attribute has __code__, if so, we check the equally of the method code filename (__code__.co_filename) - to the default once generated by the dataclass and attr module + to the default one generated by the dataclass and attr module for dataclasses the default co_filename is , for attrs class, the __eq__ should contain "attrs eq generated" """ # inspired from https://github.com/willmcgugan/rich/blob/07d51ffc1aee6f16bd2e5a25b4e82850fb9ed778/rich/pretty.py#L68 diff --git a/testing/test_config.py b/testing/test_config.py index 26113272a37..9a57b919dd9 100644 --- a/testing/test_config.py +++ b/testing/test_config.py @@ -807,7 +807,7 @@ def test_confcutdir_check_isdir(self, pytester: Pytester) -> None: with pytest.raises(pytest.UsageError, match=exp_match): pytester.parseconfig("--confcutdir", pytester.path.joinpath("file")) with pytest.raises(pytest.UsageError, match=exp_match): - pytester.parseconfig("--confcutdir", pytester.path.joinpath("inexistent")) + pytester.parseconfig("--confcutdir", pytester.path.joinpath("nonexistent")) p = pytester.mkdir("dir") config = pytester.parseconfig("--confcutdir", p) From b0585933626bfd4022c4ecaf4ca1779c1b80a2b1 Mon Sep 17 00:00:00 2001 From: "Kian-Meng, Ang" Date: Thu, 23 Dec 2021 19:24:38 +0800 Subject: [PATCH 3/3] Revert output changes --- doc/en/how-to/output.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/en/how-to/output.rst b/doc/en/how-to/output.rst index db494b176a5..4b90988f49d 100644 --- a/doc/en/how-to/output.rst +++ b/doc/en/how-to/output.rst @@ -111,7 +111,7 @@ Executing pytest normally gives us this output (we are skipping the header to fo test_verbosity_example.py:19: AssertionError ========================= short test summary info ========================== - FAILED test_verbosity_example.py::test_words_fail - AssertionError: assert... + FAILED test_verbosity_example.py::test_words_fail - AssertionError: asser... FAILED test_verbosity_example.py::test_numbers_fail - AssertionError: ass... FAILED test_verbosity_example.py::test_long_text_fail - AssertionError: a... ======================= 3 failed, 1 passed in 0.12s ======================== @@ -180,7 +180,7 @@ Now we can increase pytest's verbosity: test_verbosity_example.py:19: AssertionError ========================= short test summary info ========================== - FAILED test_verbosity_example.py::test_words_fail - AssertionError: assert... + FAILED test_verbosity_example.py::test_words_fail - AssertionError: asser... FAILED test_verbosity_example.py::test_numbers_fail - AssertionError: ass... FAILED test_verbosity_example.py::test_long_text_fail - AssertionError: a... ======================= 3 failed, 1 passed in 0.12s ======================== @@ -250,7 +250,7 @@ Now if we increase verbosity even more: test_verbosity_example.py:19: AssertionError ========================= short test summary info ========================== - FAILED test_verbosity_example.py::test_words_fail - AssertionError: assert... + FAILED test_verbosity_example.py::test_words_fail - AssertionError: asser... FAILED test_verbosity_example.py::test_numbers_fail - AssertionError: ass... FAILED test_verbosity_example.py::test_long_text_fail - AssertionError: a... ======================= 3 failed, 1 passed in 0.12s ========================