Skip to content

Commit bb5a125

Browse files
[8.2.x] Spelling (#12331)
Co-authored-by: Josh Soref <[email protected]>
1 parent f179bf2 commit bb5a125

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+100
-97
lines changed

Diff for: doc/en/announce/release-2.0.0.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ New Features
6262
- new "-q" option which decreases verbosity and prints a more
6363
nose/unittest-style "dot" output.
6464

65-
- many many more detailed improvements details
65+
- many, many, more detailed improvements details
6666

6767
Fixes
6868
-----------------------
@@ -109,7 +109,7 @@ Important Notes
109109
in conftest.py files. They will cause nothing special.
110110
- removed support for calling the pre-1.0 collection API of "run()" and "join"
111111
- removed reading option values from conftest.py files or env variables.
112-
This can now be done much much better and easier through the ini-file
112+
This can now be done much, much, better and easier through the ini-file
113113
mechanism and the "addopts" entry in particular.
114114
- removed the "disabled" attribute in test classes. Use the skipping
115115
and pytestmark mechanism to skip or xfail a test class.

Diff for: doc/en/announce/release-2.2.2.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pytest-2.2.2: bug fixes
44
pytest-2.2.2 (updated to 2.2.3 to fix packaging issues) is a minor
55
backward-compatible release of the versatile py.test testing tool. It
66
contains bug fixes and a few refinements particularly to reporting with
7-
"--collectonly", see below for betails.
7+
"--collectonly", see below for details.
88

99
For general information see here:
1010

Diff for: doc/en/announce/release-2.4.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ Bug fixes:
181181
partially failed (finalizers would not always be called before)
182182

183183
- fix issue320 - fix class scope for fixtures when mixed with
184-
module-level functions. Thanks Anatloy Bubenkoff.
184+
module-level functions. Thanks Anatoly Bubenkoff.
185185

186186
- you can specify "-q" or "-qq" to get different levels of "quieter"
187187
reporting (thanks Katarzyna Jachim)

Diff for: doc/en/announce/release-2.5.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ holger krekel
8383
Thanks Ralph Schmitt for the precise failure example.
8484

8585
- fix issue244 by implementing special index for parameters to only use
86-
indices for paramentrized test ids
86+
indices for parametrized test ids
8787

8888
- fix issue287 by running all finalizers but saving the exception
8989
from the first failing finalizer and re-raising it so teardown will

Diff for: doc/en/announce/release-2.6.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ holger krekel
7373
- cleanup setup.py a bit and specify supported versions. Thanks Jurko
7474
Gospodnetic for the PR.
7575

76-
- change XPASS colour to yellow rather then red when tests are run
76+
- change XPASS colour to yellow rather than red when tests are run
7777
with -v.
7878

7979
- fix issue473: work around mock putting an unbound method into a class

Diff for: doc/en/announce/release-2.7.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ holger krekel
5555
github. See https://pytest.org/en/stable/contributing.html .
5656
Thanks to Anatoly for pushing and initial work on this.
5757

58-
- fix issue650: new option ``--docttest-ignore-import-errors`` which
58+
- fix issue650: new option ``--doctest-ignore-import-errors`` which
5959
will turn import errors in doctests into skips. Thanks Charles Cloud
6060
for the complete PR.
6161

Diff for: doc/en/announce/sprint2016.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ place on 20th, 21st, 22nd, 24th and 25th. On the 23rd we took a break
4949
day for some hot hiking in the Black Forest.
5050

5151
Sprint activity was organised heavily around pairing, with plenty of group
52-
discusssions to take advantage of the high bandwidth, and lightning talks
52+
discussions to take advantage of the high bandwidth, and lightning talks
5353
as well.
5454

5555

Diff for: doc/en/changelog.rst

+19-19
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ Improvements
168168
- `#11311 <https://github.com/pytest-dev/pytest/issues/11311>`_: When using ``--override-ini`` for paths in invocations without a configuration file defined, the current working directory is used
169169
as the relative directory.
170170

171-
Previoulsy this would raise an :class:`AssertionError`.
171+
Previously this would raise an :class:`AssertionError`.
172172

173173

174174
- `#11475 <https://github.com/pytest-dev/pytest/issues/11475>`_: :ref:`--import-mode=importlib <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.
@@ -1411,7 +1411,7 @@ Deprecations
14111411
``__init__`` method, they should take ``**kwargs``. See
14121412
:ref:`uncooperative-constructors-deprecated` for details.
14131413

1414-
Note that a deprection warning is only emitted when there is a conflict in the
1414+
Note that a deprecation warning is only emitted when there is a conflict in the
14151415
arguments pytest expected to pass. This deprecation was already part of pytest
14161416
7.0.0rc1 but wasn't documented.
14171417

@@ -1453,7 +1453,7 @@ Breaking Changes
14531453
- `#7259 <https://github.com/pytest-dev/pytest/issues/7259>`_: The :ref:`Node.reportinfo() <non-python tests>` function first return value type has been expanded from `py.path.local | str` to `os.PathLike[str] | str`.
14541454

14551455
Most plugins which refer to `reportinfo()` only define it as part of a custom :class:`pytest.Item` implementation.
1456-
Since `py.path.local` is an `os.PathLike[str]`, these plugins are unaffacted.
1456+
Since `py.path.local` is an `os.PathLike[str]`, these plugins are unaffected.
14571457

14581458
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)`.
14591459
Although preferably, avoid the legacy `py.path.local` and use `pathlib.Path`, or use `item.location` or `item.path`, instead.
@@ -1961,7 +1961,7 @@ Bug Fixes
19611961
the ``tmp_path``/``tmpdir`` fixture). Now the directories are created with
19621962
private permissions.
19631963

1964-
pytest used to silently use a pre-existing ``/tmp/pytest-of-<username>`` directory,
1964+
pytest used to silently use a preexisting ``/tmp/pytest-of-<username>`` directory,
19651965
even if owned by another user. This means another user could pre-create such a
19661966
directory and gain control of another user's temporary directory. Now such a
19671967
condition results in an error.
@@ -2688,7 +2688,7 @@ Features
26882688
also changes ``sys.modules`` as a side-effect), which works but has a number of drawbacks, like requiring test modules
26892689
that don't live in packages to have unique names (as they need to reside under a unique name in ``sys.modules``).
26902690

2691-
``--import-mode=importlib`` uses more fine grained import mechanisms from ``importlib`` which don't
2691+
``--import-mode=importlib`` uses more fine-grained import mechanisms from ``importlib`` which don't
26922692
require pytest to change ``sys.path`` or ``sys.modules`` at all, eliminating much of the drawbacks
26932693
of the previous mode.
26942694

@@ -2705,7 +2705,7 @@ Improvements
27052705
------------
27062706

27072707
- :issue:`4375`: The ``pytest`` command now suppresses the ``BrokenPipeError`` error message that
2708-
is printed to stderr when the output of ``pytest`` is piped and and the pipe is
2708+
is printed to stderr when the output of ``pytest`` is piped and the pipe is
27092709
closed by the piped-to program (common examples are ``less`` and ``head``).
27102710

27112711

@@ -3007,7 +3007,7 @@ Breaking Changes
30073007
This hook has been marked as deprecated and not been even called by pytest for over 10 years now.
30083008

30093009

3010-
- :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.
3010+
- :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.
30113011

30123012

30133013
- :issue:`6737`: The ``cached_result`` attribute of ``FixtureDef`` is now set to ``None`` when
@@ -4612,7 +4612,7 @@ Bug Fixes
46124612
Improved Documentation
46134613
----------------------
46144614

4615-
- :issue:`4974`: Update docs for ``pytest_cmdline_parse`` hook to note availability liminations
4615+
- :issue:`4974`: Update docs for ``pytest_cmdline_parse`` hook to note availability limitations
46164616

46174617

46184618

@@ -6470,7 +6470,7 @@ Features
64706470
Bug Fixes
64716471
---------
64726472

6473-
- Fix hanging pexpect test on MacOS by using flush() instead of wait().
6473+
- Fix hanging pexpect test on macOS by using flush() instead of wait().
64746474
(:issue:`2022`)
64756475

64766476
- Fix restoring Python state after in-process pytest runs with the
@@ -6518,7 +6518,7 @@ Trivial/Internal Changes
65186518
------------------------
65196519

65206520
- Show a simple and easy error when keyword expressions trigger a syntax error
6521-
(for example, ``"-k foo and import"`` will show an error that you can not use
6521+
(for example, ``"-k foo and import"`` will show an error that you cannot use
65226522
the ``import`` keyword in expressions). (:issue:`2953`)
65236523

65246524
- Change parametrized automatic test id generation to use the ``__name__``
@@ -8294,7 +8294,7 @@ time or change existing behaviors in order to make them less surprising/more use
82948294
one will also have a "reprec" attribute with the recorded events/reports.
82958295

82968296
- fix monkeypatch.setattr("x.y", raising=False) to actually not raise
8297-
if "y" is not a pre-existing attribute. Thanks Florian Bruhin.
8297+
if "y" is not a preexisting attribute. Thanks Florian Bruhin.
82988298

82998299
- fix issue741: make running output from testdir.run copy/pasteable
83008300
Thanks Bruno Oliveira.
@@ -8350,7 +8350,7 @@ time or change existing behaviors in order to make them less surprising/more use
83508350

83518351
- fix issue854: autouse yield_fixtures defined as class members of
83528352
unittest.TestCase subclasses now work as expected.
8353-
Thannks xmo-odoo for the report and Bruno Oliveira for the PR.
8353+
Thanks xmo-odoo for the report and Bruno Oliveira for the PR.
83548354

83558355
- fix issue833: --fixtures now shows all fixtures of collected test files, instead of just the
83568356
fixtures declared on the first one.
@@ -8454,7 +8454,7 @@ time or change existing behaviors in order to make them less surprising/more use
84548454
github. See https://pytest.org/en/stable/contributing.html .
84558455
Thanks to Anatoly for pushing and initial work on this.
84568456

8457-
- fix issue650: new option ``--docttest-ignore-import-errors`` which
8457+
- fix issue650: new option ``--doctest-ignore-import-errors`` which
84588458
will turn import errors in doctests into skips. Thanks Charles Cloud
84598459
for the complete PR.
84608460

@@ -8642,7 +8642,7 @@ time or change existing behaviors in order to make them less surprising/more use
86428642
- cleanup setup.py a bit and specify supported versions. Thanks Jurko
86438643
Gospodnetic for the PR.
86448644

8645-
- change XPASS colour to yellow rather then red when tests are run
8645+
- change XPASS colour to yellow rather than red when tests are run
86468646
with -v.
86478647

86488648
- fix issue473: work around mock putting an unbound method into a class
@@ -8815,15 +8815,15 @@ time or change existing behaviors in order to make them less surprising/more use
88158815
Thanks Ralph Schmitt for the precise failure example.
88168816

88178817
- fix issue244 by implementing special index for parameters to only use
8818-
indices for paramentrized test ids
8818+
indices for parametrized test ids
88198819

88208820
- fix issue287 by running all finalizers but saving the exception
88218821
from the first failing finalizer and re-raising it so teardown will
88228822
still have failed. We reraise the first failing exception because
88238823
it might be the cause for other finalizers to fail.
88248824

88258825
- fix ordering when mock.patch or other standard decorator-wrappings
8826-
are used with test methods. This fixues issue346 and should
8826+
are used with test methods. This fixes issue346 and should
88278827
help with random "xdist" collection failures. Thanks to
88288828
Ronny Pfannschmidt and Donald Stufft for helping to isolate it.
88298829

@@ -9080,7 +9080,7 @@ Bug fixes:
90809080
partially failed (finalizers would not always be called before)
90819081

90829082
- fix issue320 - fix class scope for fixtures when mixed with
9083-
module-level functions. Thanks Anatloy Bubenkoff.
9083+
module-level functions. Thanks Anatoly Bubenkoff.
90849084

90859085
- you can specify "-q" or "-qq" to get different levels of "quieter"
90869086
reporting (thanks Katarzyna Jachim)
@@ -9502,7 +9502,7 @@ Bug fixes:
95029502
unexpected exceptions
95039503
- fix issue47: timing output in junitxml for test cases is now correct
95049504
- fix issue48: typo in MarkInfo repr leading to exception
9505-
- fix issue49: avoid confusing error when initizaliation partially fails
9505+
- fix issue49: avoid confusing error when initialization partially fails
95069506
- fix issue44: env/username expansion for junitxml file path
95079507
- show releaselevel information in test runs for pypy
95089508
- reworked doc pages for better navigation and PDF generation
@@ -9627,7 +9627,7 @@ Bug fixes:
96279627
collection-before-running semantics were not
96289628
setup as with pytest 1.3.4. Note, however, that
96299629
the recommended and much cleaner way to do test
9630-
parametraization remains the "pytest_generate_tests"
9630+
parameterization remains the "pytest_generate_tests"
96319631
mechanism, see the docs.
96329632

96339633
2.0.0 (2010-11-25)

Diff for: doc/en/deprecations.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ Now :class:`~pytest.Class` collects the test methods directly.
462462
Most plugins which reference ``Instance`` do so in order to ignore or skip it,
463463
using a check such as ``if isinstance(node, Instance): return``.
464464
Such plugins should simply remove consideration of ``Instance`` on pytest>=7.
465-
However, to keep such uses working, a dummy type has been instanted in ``pytest.Instance`` and ``_pytest.python.Instance``,
465+
However, to keep such uses working, a dummy type has been instanced in ``pytest.Instance`` and ``_pytest.python.Instance``,
466466
and importing it emits a deprecation warning. This was removed in pytest 8.
467467

468468

Diff for: doc/en/example/customdirectory/conftest.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def collect(self):
2121

2222
@pytest.hookimpl
2323
def pytest_collect_directory(path, parent):
24-
# Use our custom collector for directories containing a `mainfest.json` file.
24+
# Use our custom collector for directories containing a `manifest.json` file.
2525
if path.joinpath("manifest.json").is_file():
2626
return ManifestDirectory.from_parent(parent=parent, path=path)
2727
# Otherwise fallback to the standard behavior.

Diff for: doc/en/getting-started.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Continue reading
274274
Check out additional pytest resources to help you customize tests for your unique workflow:
275275

276276
* ":ref:`usage`" for command line invocation examples
277-
* ":ref:`existingtestsuite`" for working with pre-existing tests
277+
* ":ref:`existingtestsuite`" for working with preexisting tests
278278
* ":ref:`mark`" for information on the ``pytest.mark`` mechanism
279279
* ":ref:`fixtures`" for providing a functional baseline to your tests
280280
* ":ref:`plugins`" for managing and writing plugins

Diff for: doc/en/naming20.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ If you used older version of the ``py`` distribution (which
88
included the py.test command line tool and Python name space)
99
you accessed helpers and possibly collection classes through
1010
the ``py.test`` Python namespaces. The new ``pytest``
11-
Python module flaty provides the same objects, following
11+
Python module flatly provides the same objects, following
1212
these renaming rules::
1313

1414
py.test.XYZ -> pytest.XYZ

Diff for: doc/en/reference/fixtures.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Built-in fixtures
3939
Store and retrieve values across pytest runs.
4040

4141
:fixture:`doctest_namespace`
42-
Provide a dict injected into the docstests namespace.
42+
Provide a dict injected into the doctests namespace.
4343

4444
:fixture:`monkeypatch`
4545
Temporarily modify classes, functions, dictionaries,

Diff for: doc/en/reference/reference.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1940,7 +1940,7 @@ All the command-line flags can be obtained by running ``pytest --help``::
19401940

19411941
general:
19421942
-k EXPRESSION Only run tests which match the given substring
1943-
expression. An expression is a Python evaluatable
1943+
expression. An expression is a Python evaluable
19441944
expression where all names are substring-matched
19451945
against test names and their parent classes.
19461946
Example: -k 'test_method or test_other' matches all

Diff for: src/_pytest/_py/error.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def __str__(self) -> str:
4141
3: errno.ENOENT,
4242
17: errno.EEXIST,
4343
18: errno.EXDEV,
44-
13: errno.EBUSY, # empty cd drive, but ENOMEDIUM seems unavailiable
44+
13: errno.EBUSY, # empty cd drive, but ENOMEDIUM seems unavailable
4545
22: errno.ENOTDIR,
4646
20: errno.ENOTDIR,
4747
267: errno.ENOTDIR,

Diff for: src/_pytest/_py/path.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ def mtime(self) -> float:
836836
def copy(self, target, mode=False, stat=False):
837837
"""Copy path to target.
838838
839-
If mode is True, will copy copy permission from path to target.
839+
If mode is True, will copy permission from path to target.
840840
If stat is True, copy permission, last modification
841841
time, last access time, and flags from path to target.
842842
"""
@@ -1047,7 +1047,7 @@ def chmod(self, mode, rec=0):
10471047
def pypkgpath(self):
10481048
"""Return the Python package path by looking for the last
10491049
directory upwards which still contains an __init__.py.
1050-
Return None if a pkgpath can not be determined.
1050+
Return None if a pkgpath cannot be determined.
10511051
"""
10521052
pkgpath = None
10531053
for parent in self.parts(reverse=True):

Diff for: src/_pytest/assertion/rewrite.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -584,7 +584,7 @@ def _write_and_reset() -> None:
584584
# multi-line assert with message
585585
elif lineno in seen_lines:
586586
lines[-1] = lines[-1][:offset]
587-
# multi line assert with escapd newline before message
587+
# multi line assert with escaped newline before message
588588
else:
589589
lines.append(line[:offset])
590590
_write_and_reset()

Diff for: src/_pytest/assertion/util.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def _diff_text(left: str, right: str, verbose: int = 0) -> List[str]:
325325
def _compare_eq_iterable(
326326
left: Iterable[Any],
327327
right: Iterable[Any],
328-
highligher: _HighlightFunc,
328+
highlighter: _HighlightFunc,
329329
verbose: int = 0,
330330
) -> List[str]:
331331
if verbose <= 0 and not running_on_ci():
@@ -340,7 +340,7 @@ def _compare_eq_iterable(
340340
# "right" is the expected base against which we compare "left",
341341
# see https://github.com/pytest-dev/pytest/issues/3333
342342
explanation.extend(
343-
highligher(
343+
highlighter(
344344
"\n".join(
345345
line.rstrip()
346346
for line in difflib.ndiff(right_formatting, left_formatting)

Diff for: src/_pytest/cacheprovider.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def pytest_make_collect_report(
251251
# Sort any lf-paths to the beginning.
252252
lf_paths = self.lfplugin._last_failed_paths
253253

254-
# Use stable sort to priorize last failed.
254+
# Use stable sort to prioritize last failed.
255255
def sort_key(node: Union[nodes.Item, nodes.Collector]) -> bool:
256256
return node.path in lf_paths
257257

Diff for: src/_pytest/compat.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def iscoroutinefunction(func: object) -> bool:
5353
def syntax, and doesn't contain yield), or a function decorated with
5454
@asyncio.coroutine.
5555
56-
Note: copied and modified from Python 3.5's builtin couroutines.py to avoid
56+
Note: copied and modified from Python 3.5's builtin coroutines.py to avoid
5757
importing asyncio directly, which in turns also initializes the "logging"
5858
module as a side-effect (see issue #8).
5959
"""

Diff for: src/_pytest/config/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def parse_hookimpl_opts(
462462
# (see issue #1073).
463463
if not name.startswith("pytest_"):
464464
return None
465-
# Ignore names which can not be hooks.
465+
# Ignore names which cannot be hooks.
466466
if name == "pytest_plugins":
467467
return None
468468

@@ -574,8 +574,8 @@ def _set_initial_conftests(
574574
self._noconftest = noconftest
575575
self._using_pyargs = pyargs
576576
foundanchor = False
577-
for intitial_path in args:
578-
path = str(intitial_path)
577+
for initial_path in args:
578+
path = str(initial_path)
579579
# remove node-id syntax
580580
i = path.find("::")
581581
if i != -1:

0 commit comments

Comments
 (0)