Skip to content

Commit

Permalink
[7.3.x] Spelling and grammar fixes (#11015)
Browse files Browse the repository at this point in the history
Co-authored-by: Ville Skyttä <ville.skytta@iki.fi>
  • Loading branch information
github-actions[bot] and scop committed May 18, 2023
1 parent efcb81c commit 6c95cb6
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions doc/en/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ Breaking Changes
- `#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`.

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

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.
Expand Down Expand Up @@ -4067,7 +4067,7 @@ Removals
See our :ref:`docs <calling fixtures directly deprecated>` on information on how to update your code.


- :issue:`4546`: Remove ``Node.get_marker(name)`` the return value was not usable for more than a existence check.
- :issue:`4546`: Remove ``Node.get_marker(name)`` the return value was not usable for more than an existence check.

Use ``Node.get_closest_marker(name)`` as a replacement.

Expand Down
2 changes: 1 addition & 1 deletion doc/en/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@
# The scheme of the identifier. Typical schemes are ISBN or URL.
# epub_scheme = ''

# The unique identifier of the text. This can be a ISBN number
# The unique identifier of the text. This can be an ISBN number
# or the project homepage.
# epub_identifier = ''

Expand Down
4 changes: 2 additions & 2 deletions doc/en/reference/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1049,11 +1049,11 @@ Environment variables that can be used to change pytest's behavior.

.. envvar:: CI

When set (regardless of value), pytest acknowledges that is running in a CI process. Alterative to ``BUILD_NUMBER`` variable.
When set (regardless of value), pytest acknowledges that is running in a CI process. Alternative to ``BUILD_NUMBER`` variable.

.. envvar:: BUILD_NUMBER

When set (regardless of value), pytest acknowledges that is running in a CI process. Alterative to CI variable.
When set (regardless of value), pytest acknowledges that is running in a CI process. Alternative to CI variable.

.. envvar:: PYTEST_ADDOPTS

Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/capture.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def tell(self) -> int:
raise UnsupportedOperation("redirected stdin is pseudofile, has no tell()")

def truncate(self, size: Optional[int] = None) -> int:
raise UnsupportedOperation("cannont truncate stdin")
raise UnsupportedOperation("cannot truncate stdin")

def write(self, data: str) -> int:
raise UnsupportedOperation("cannot write to stdin")
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/tmpdir.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def from_config(
policy = config.getini("tmp_path_retention_policy")
if policy not in ("all", "failed", "none"):
raise ValueError(
f"tmp_path_retention_policy must be either all, failed, none. Current intput: {policy}."
f"tmp_path_retention_policy must be either all, failed, none. Current input: {policy}."
)

return cls(
Expand Down
2 changes: 1 addition & 1 deletion src/_pytest/warning_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def warn_explicit_for(method: FunctionType, message: PytestWarning) -> None:
"""
Issue the warning :param:`message` for the definition of the given :param:`method`
this helps to log warnigns for functions defined prior to finding an issue with them
this helps to log warnings for functions defined prior to finding an issue with them
(like hook wrappers being marked in a legacy mechanism)
"""
lineno = method.__code__.co_firstlineno
Expand Down
2 changes: 1 addition & 1 deletion testing/test_python_path.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_no_ini(pytester: Pytester, file_structure) -> None:

def test_clean_up(pytester: Pytester) -> None:
"""Test that the plugin cleans up after itself."""
# This is tough to test behaviorly because the cleanup really runs last.
# This is tough to test behaviorally because the cleanup really runs last.
# So the test make several implementation assumptions:
# - Cleanup is done in pytest_unconfigure().
# - Not a hookwrapper.
Expand Down

0 comments on commit 6c95cb6

Please sign in to comment.