From 22ab737243387282acac2ebb735802ebe2042876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 29 Oct 2018 23:45:45 +0200 Subject: [PATCH] Spelling and grammar fixes --- CHANGELOG.rst | 2 +- doc/en/proposals/parametrize_with_fixtures.rst | 2 +- doc/en/writing_plugins.rst | 2 +- src/_pytest/capture.py | 2 +- src/_pytest/config/argparsing.py | 2 +- src/_pytest/fixtures.py | 2 +- src/_pytest/hookspec.py | 4 ++-- src/_pytest/mark/structures.py | 2 +- src/_pytest/pathlib.py | 10 +++++----- src/_pytest/python.py | 4 ++-- 10 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 06ea24e23..6b06cbfb5 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -541,7 +541,7 @@ Bug Fixes - `#3473 `_: Raise immediately if ``approx()`` is given an expected value of a type it doesn't understand (e.g. strings, nested dicts, etc.). -- `#3712 `_: Correctly represent the dimensions of an numpy array when calling ``repr()`` on ``approx()``. +- `#3712 `_: Correctly represent the dimensions of a numpy array when calling ``repr()`` on ``approx()``. - `#3742 `_: Fix incompatibility with third party plugins during collection, which produced the error ``object has no attribute '_collectfile'``. diff --git a/doc/en/proposals/parametrize_with_fixtures.rst b/doc/en/proposals/parametrize_with_fixtures.rst index 92e7993f3..b7295f27a 100644 --- a/doc/en/proposals/parametrize_with_fixtures.rst +++ b/doc/en/proposals/parametrize_with_fixtures.rst @@ -75,7 +75,7 @@ Issues ------ * By using ``request.getfuncargvalue()`` we rely on actual fixture function - execution to know what fixtures are involved, due to it's dynamic nature + execution to know what fixtures are involved, due to its dynamic nature * More importantly, ``request.getfuncargvalue()`` cannot be combined with parametrized fixtures, such as ``extra_context`` * This is very inconvenient if you wish to extend an existing test suite by diff --git a/doc/en/writing_plugins.rst b/doc/en/writing_plugins.rst index 027a087b4..464f8eb00 100644 --- a/doc/en/writing_plugins.rst +++ b/doc/en/writing_plugins.rst @@ -386,7 +386,7 @@ return a result object, with which we can assert the tests' outcomes. result.assert_outcomes(passed=4) -additionally it is possible to copy examples for a example folder before running pytest on it +additionally it is possible to copy examples for an example folder before running pytest on it .. code:: ini diff --git a/src/_pytest/capture.py b/src/_pytest/capture.py index bc50ccc3f..38f4292f9 100644 --- a/src/_pytest/capture.py +++ b/src/_pytest/capture.py @@ -124,7 +124,7 @@ class CaptureManager(object): def read_global_capture(self): return self._global_capturing.readouterr() - # Fixture Control (its just forwarding, think about removing this later) + # Fixture Control (it's just forwarding, think about removing this later) def activate_fixture(self, item): """If the current item is using ``capsys`` or ``capfd``, activate them so they take precedence over diff --git a/src/_pytest/config/argparsing.py b/src/_pytest/config/argparsing.py index 5012456b9..5b8306dda 100644 --- a/src/_pytest/config/argparsing.py +++ b/src/_pytest/config/argparsing.py @@ -152,7 +152,7 @@ class ArgumentError(Exception): class Argument(object): """class that mimics the necessary behaviour of optparse.Option - its currently a least effort implementation + it's currently a least effort implementation and ignoring choices and integer prefixes https://docs.python.org/3/library/optparse.html#optparse-standard-option-types """ diff --git a/src/_pytest/fixtures.py b/src/_pytest/fixtures.py index 49c3402dc..3d57d9cf2 100644 --- a/src/_pytest/fixtures.py +++ b/src/_pytest/fixtures.py @@ -618,7 +618,7 @@ class FixtureRequest(FuncargnamesCompatAttr): subrequest._check_scope(argname, self.scope, scope) # clear sys.exc_info before invoking the fixture (python bug?) - # if its not explicitly cleared it will leak into the call + # if it's not explicitly cleared it will leak into the call exc_clear() try: # call the fixture function diff --git a/src/_pytest/hookspec.py b/src/_pytest/hookspec.py index 27e55f0ea..18f23a50a 100644 --- a/src/_pytest/hookspec.py +++ b/src/_pytest/hookspec.py @@ -41,10 +41,10 @@ def pytest_namespace(): Plugins whose users depend on the current namespace functionality should prepare to migrate to a namespace they actually own. - To support the migration its suggested to trigger ``DeprecationWarnings`` for objects they put into the + To support the migration it's suggested to trigger ``DeprecationWarnings`` for objects they put into the pytest namespace. - An stopgap measure to avoid the warning is to monkeypatch the ``pytest`` module, but just as the + A stopgap measure to avoid the warning is to monkeypatch the ``pytest`` module, but just as the ``pytest_namespace`` hook this should be seen as a temporary measure to be removed in future versions after an appropriate transition period. """ diff --git a/src/_pytest/mark/structures.py b/src/_pytest/mark/structures.py index 2ca1d830a..b8fa011d1 100644 --- a/src/_pytest/mark/structures.py +++ b/src/_pytest/mark/structures.py @@ -443,7 +443,7 @@ class NodeKeywords(MappingMixin): @attr.s(cmp=False, hash=False) class NodeMarkers(object): """ - internal strucutre for storing marks belongong to a node + internal structure for storing marks belonging to a node ..warning:: diff --git a/src/_pytest/pathlib.py b/src/_pytest/pathlib.py index 7cf3f40b6..5063c4651 100644 --- a/src/_pytest/pathlib.py +++ b/src/_pytest/pathlib.py @@ -36,7 +36,7 @@ get_lock_path = operator.methodcaller("joinpath", ".lock") def ensure_reset_dir(path): """ - ensures the given path is a empty directory + ensures the given path is an empty directory """ if path.exists(): rmtree(path, force=True) @@ -106,7 +106,7 @@ else: def _force_symlink(root, target, link_to): """helper to create the current symlink - its full of race conditions that are reasonably ok to ignore + it's full of race conditions that are reasonably ok to ignore for the contex of best effort linking to the latest testrun the presumption being thatin case of much parallelism @@ -124,7 +124,7 @@ def _force_symlink(root, target, link_to): def make_numbered_dir(root, prefix): - """create a directory with a increased number as suffix for the given prefix""" + """create a directory with an increased number as suffix for the given prefix""" for i in range(10): # try up to 10 times to create the folder max_existing = _max(map(parse_num, find_suffixes(root, prefix)), default=-1) @@ -164,7 +164,7 @@ def create_cleanup_lock(p): os.write(fd, spid) os.close(fd) if not lock_path.is_file(): - raise EnvironmentError("lock path got renamed after sucessfull creation") + raise EnvironmentError("lock path got renamed after successful creation") return lock_path @@ -221,7 +221,7 @@ def ensure_deletable(path, consider_lock_dead_if_created_before): def try_cleanup(path, consider_lock_dead_if_created_before): - """tries to cleanup a folder if we can ensure its deletable""" + """tries to cleanup a folder if we can ensure it's deletable""" if ensure_deletable(path, consider_lock_dead_if_created_before): maybe_delete_a_numbered_dir(path) diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 6fd74acb1..58f95034d 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -661,7 +661,7 @@ class Instance(PyCollector): _ALLOW_MARKERS = False # hack, destroy later # instances share the object with their parents in a way # that duplicates markers instances if not taken out - # can be removed at node strucutre reorganization time + # can be removed at node structure reorganization time def _getobj(self): return self.parent.obj() @@ -1343,7 +1343,7 @@ class Function(FunctionMixin, nodes.Item, fixtures.FuncargnamesCompatAttr): """ _genid = None - # disable since functions handle it themselfes + # disable since functions handle it themselves _ALLOW_MARKERS = False def __init__(