diff --git a/doc/en/changelog.rst b/doc/en/changelog.rst index 25e5b1f92..9e699a7a0 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 7bb3693f9..e8c092cc4 100644 --- a/src/_pytest/_py/path.py +++ b/src/_pytest/_py/path.py @@ -1047,7 +1047,7 @@ class LocalPath: 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 7ff27643f..fcba5a112 100644 --- a/src/_pytest/config/__init__.py +++ b/src/_pytest/config/__init__.py @@ -454,7 +454,7 @@ class PytestPluginManager(PluginManager): # (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 e39f47723..3efd2b1d7 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 3b92d65bd..86edfbbeb 100644 --- a/testing/test_junitxml.py +++ b/testing/test_junitxml.py @@ -1002,7 +1002,7 @@ class TestNonPython: @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