Spelling and grammar fixes (#11014)
This commit is contained in:
parent
739408b958
commit
6041511fb4
|
@ -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`.
|
- `#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.
|
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)`.
|
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.
|
Although preferably, avoid the legacy `py.path.local` and use `pathlib.Path`, or use `item.location` or `item.path`, instead.
|
||||||
|
@ -4067,7 +4067,7 @@ Removals
|
||||||
See our :ref:`docs <calling fixtures directly deprecated>` on information on how to update your code.
|
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.
|
Use ``Node.get_closest_marker(name)`` as a replacement.
|
||||||
|
|
||||||
|
|
|
@ -341,7 +341,7 @@ epub_copyright = "2013, holger krekel et alii"
|
||||||
# The scheme of the identifier. Typical schemes are ISBN or URL.
|
# The scheme of the identifier. Typical schemes are ISBN or URL.
|
||||||
# epub_scheme = ''
|
# 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.
|
# or the project homepage.
|
||||||
# epub_identifier = ''
|
# epub_identifier = ''
|
||||||
|
|
||||||
|
|
|
@ -1049,11 +1049,11 @@ Environment variables that can be used to change pytest's behavior.
|
||||||
|
|
||||||
.. envvar:: CI
|
.. 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
|
.. 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
|
.. envvar:: PYTEST_ADDOPTS
|
||||||
|
|
||||||
|
|
|
@ -241,7 +241,7 @@ class DontReadFromInput(TextIO):
|
||||||
raise UnsupportedOperation("redirected stdin is pseudofile, has no tell()")
|
raise UnsupportedOperation("redirected stdin is pseudofile, has no tell()")
|
||||||
|
|
||||||
def truncate(self, size: Optional[int] = None) -> int:
|
def truncate(self, size: Optional[int] = None) -> int:
|
||||||
raise UnsupportedOperation("cannont truncate stdin")
|
raise UnsupportedOperation("cannot truncate stdin")
|
||||||
|
|
||||||
def write(self, data: str) -> int:
|
def write(self, data: str) -> int:
|
||||||
raise UnsupportedOperation("cannot write to stdin")
|
raise UnsupportedOperation("cannot write to stdin")
|
||||||
|
|
|
@ -100,7 +100,7 @@ class TempPathFactory:
|
||||||
policy = config.getini("tmp_path_retention_policy")
|
policy = config.getini("tmp_path_retention_policy")
|
||||||
if policy not in ("all", "failed", "none"):
|
if policy not in ("all", "failed", "none"):
|
||||||
raise ValueError(
|
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(
|
return cls(
|
||||||
|
|
|
@ -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`
|
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)
|
(like hook wrappers being marked in a legacy mechanism)
|
||||||
"""
|
"""
|
||||||
lineno = method.__code__.co_firstlineno
|
lineno = method.__code__.co_firstlineno
|
||||||
|
|
|
@ -82,7 +82,7 @@ def test_no_ini(pytester: Pytester, file_structure) -> None:
|
||||||
|
|
||||||
def test_clean_up(pytester: Pytester) -> None:
|
def test_clean_up(pytester: Pytester) -> None:
|
||||||
"""Test that the plugin cleans up after itself."""
|
"""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:
|
# So the test make several implementation assumptions:
|
||||||
# - Cleanup is done in pytest_unconfigure().
|
# - Cleanup is done in pytest_unconfigure().
|
||||||
# - Not a hookwrapper.
|
# - Not a hookwrapper.
|
||||||
|
|
Loading…
Reference in New Issue