From 70c213400d19ac2f634e4911dd5fc5c42975d81c Mon Sep 17 00:00:00 2001 From: Kian-Meng Ang Date: Sat, 24 Dec 2022 15:19:53 +0800 Subject: [PATCH] Fix typos Found via `codespell`. --- .github/workflows/base.yml | 2 +- docs/api_reference.md | 14 +++++++------- docs/changelog.md | 4 ++-- docs/index.md | 2 +- docs/pytest_goodies.md | 2 +- src/pytest_cases/case_parametrizer_new.py | 6 +++--- src/pytest_cases/common_pytest.py | 2 +- src/pytest_cases/fixture_core1_unions.py | 10 +++++----- src/pytest_cases/fixture_core2.py | 10 +++++----- src/pytest_cases/fixture_parametrize_plus.py | 14 +++++++------- src/pytest_cases/plugin.py | 12 ++++++------ tests/test_plugin_installed.py | 2 +- 12 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.github/workflows/base.yml b/.github/workflows/base.yml index a996cfbf..38b69366 100644 --- a/.github/workflows/base.yml +++ b/.github/workflows/base.yml @@ -71,7 +71,7 @@ jobs: # Share ./docs/reports so that they can be deployed with doc in next job - name: Share reports with other jobs - # if: matrix.nox_session == '...': not needed, if empty wont be shared + # if: matrix.nox_session == '...': not needed, if empty won't be shared uses: actions/upload-artifact@master with: name: reports_dir diff --git a/docs/api_reference.md b/docs/api_reference.md index 31755bfe..ded231dc 100644 --- a/docs/api_reference.md +++ b/docs/api_reference.md @@ -358,7 +358,7 @@ cases = get_all_cases(f, cases=".") import test.test_xyz xyz_cases = get_all_cases(test.test_xyz) -# Can be used to filter explict cases, in which case no parametrization_target is needed +# Can be used to filter explicit cases, in which case no parametrization_target is needed filtered_cases = get_all_cases(cases=[case_1, case_2, case_3], has_tag=["banana"]) ``` @@ -413,7 +413,7 @@ As a consequence it does not support the `params` and `ids` arguments anymore. - **autouse**: if True, the fixture func is activated for all tests that can see it. If False (the default) then an explicitreference is needed to activate the fixture. - **name**: the name of the fixture. This defaults to the name of the decorated function. Note: If a fixture is used in the same module in which it is defined, the function name of the fixture will be shadowed by the function arg that requests the fixture; one wayto resolve this is to name the decorated function ``fixture_`` and then use ``@pytest.fixture(name='')``. - **unpack_into**: an optional iterable of names, or string containing coma-separated names, for additional fixtures to create to represent parts of this fixture. See [`unpack_fixture`](#unpack_fixture) for details. - - **hook**: an optional hook to apply to each fixture function that is created during this call. The hook function will be called everytime a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. + - **hook**: an optional hook to apply to each fixture function that is created during this call. The hook function will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. - **kwargs**: other keyword arguments for `@pytest.fixture` ### `unpack_fixture` @@ -468,7 +468,7 @@ class TestClass: - **argnames**: same as `@pytest.mark.parametrize` `argnames`. - **fixture**: a fixture name string or a fixture symbol. If a fixture symbol is provided, the created fixtures will have the same scope. If a name is provided, they will have scope='function'. Note that in practice the performance loss resulting from using `function` rather than a higher scope is negligible since the created fixtures' body is a one-liner. - **in_cls**: a boolean (default `False`). You may wish to turn this to `True` to use this function inside a class. If you do so, you **MUST** assign the output to variables in the class. - - **hook**: an optional hook to apply to each fixture function that is created during this call. The hook function will be called everytime a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. + - **hook**: an optional hook to apply to each fixture function that is created during this call. The hook function will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. **Outputs:** the created fixtures. @@ -510,7 +510,7 @@ leads to very explicit ids: `//`. See `UnionFixtureAlte - `unpack_into`: an optional iterable of names, or string containing coma-separated names, for additional fixtures to create to represent parts of this fixture. See `unpack_fixture` for details. - `ids`: as in pytest. The default value returns the correct fixture - `autouse`: as in pytest - - `hook`: an optional hook to apply to each fixture function that is created during this call. The hook function will be called everytime a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. + - `hook`: an optional hook to apply to each fixture function that is created during this call. The hook function will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. - `kwargs`: other pytest fixture options. They might not be supported correctly. **Outputs:** the new fixture. Note: you do not need to capture that output in a symbol, since the fixture is automatically registered in your module. However if you decide to do so make sure that you use the same name. @@ -555,7 +555,7 @@ def test_uses_param2(arg1, arg2, fixture_uses_param2): - `autouse`: see fixture `autouse` - `ids`: same as `@pytest.mark.parametrize` `ids` - `scope`: see fixture `scope` - - `hook`: an optional hook to apply to each fixture function that is created during this call. The hook function will be called everytime a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. + - `hook`: an optional hook to apply to each fixture function that is created during this call. The hook function will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. - `kwargs`: any other argument for the created 'fixtures' ### `param_fixture` @@ -602,7 +602,7 @@ Both `fixture_ref` and `lazy_value` can be used to represent a single argvalue, Finally, `pytest.param` is supported even when there are `fixture_ref` and `lazy_value`. -Here as for all functions above, an optional `hook` can be passed, to apply on each fixture function that is created during this call. The hook function will be called everytime a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. +Here as for all functions above, an optional `hook` can be passed, to apply on each fixture function that is created during this call. The hook function will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. **Parameters** @@ -622,7 +622,7 @@ Here as for all functions above, an optional `hook` can be passed, to apply on e - `scope`: The scope of the union fixture to create if `fixture_ref`s are found in the argvalues. Otherwise same as in `pytest.mark.parametrize`. - - `hook`: an optional hook to apply to each fixture function that is created during this call. The hook function will be called everytime a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. + - `hook`: an optional hook to apply to each fixture function that is created during this call. The hook function will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. - `debug`: print debug messages on stdout to analyze fixture creation (use pytest -s to see them) diff --git a/docs/changelog.md b/docs/changelog.md index 5eaa4870..4121a183 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -490,7 +490,7 @@ Fixed [#48](https://github.com/smarie/python-pytest-cases/issues/48). ### 1.9.0 - New `--with-reorder` commandline option -New commandline option '--with-reorder' to change the reordering startegy currently in application. Fixes [#45](https://github.com/smarie/python-pytest-cases/issues/45). +New commandline option '--with-reorder' to change the reordering strategy currently in application. Fixes [#45](https://github.com/smarie/python-pytest-cases/issues/45). The `--with-reorder` "skip" mode was not working correctly in presence of marks, fixed it. Fixed [#46](https://github.com/smarie/python-pytest-cases/issues/46). @@ -562,7 +562,7 @@ Following [Sup3rGeo](https://github.com/Sup3rGeo)'s proposal, introduced two hel ### 1.4.2 - parametrized `@pytest_fixture_plus` minor bug fix -`@pytest_fixture_plus` now correctly honors parameter id and marks overriden at single parameter level using `pytest.param`. Fixed [#30](https://github.com/smarie/python-pytest-cases/issues/30). +`@pytest_fixture_plus` now correctly honors parameter id and marks overridden at single parameter level using `pytest.param`. Fixed [#30](https://github.com/smarie/python-pytest-cases/issues/30). ### 1.4.1 - parametrized `@pytest_fixture_plus` minor bug fix diff --git a/docs/index.md b/docs/index.md index a3e084e9..f31b8da4 100644 --- a/docs/index.md +++ b/docs/index.md @@ -452,7 +452,7 @@ After starting to reuse cases in several test functions, you might end-up thinki That being said, **if you are certain that your tests do not modify your cases data**, there are several ways to solve this issue: - - the easiest way is to **use fixtures with a broad scope**, as explained [above](#b-parametrizing-fixtures). However in some parametrization scenarii, `pytest` does not guarantee that the fixture will be setup only once for the whole session, even if it is a session-scoped fixture. Also the cases will be parsed everytime you run pytest, which might be cumbersome + - the easiest way is to **use fixtures with a broad scope**, as explained [above](#b-parametrizing-fixtures). However in some parametrization scenarii, `pytest` does not guarantee that the fixture will be setup only once for the whole session, even if it is a session-scoped fixture. Also the cases will be parsed every time you run pytest, which might be cumbersome ```python from pytest_cases import parametrize, parametrize_with_cases, fixture diff --git a/docs/pytest_goodies.md b/docs/pytest_goodies.md index 717a13fc..10030af3 100644 --- a/docs/pytest_goodies.md +++ b/docs/pytest_goodies.md @@ -272,7 +272,7 @@ Another consequence of using [`fixture_ref`](./api_reference.md#fixture_ref) is ## passing a `hook` -As per version `1.14`, all the above functions now support passing a `hook` argument. This argument should be a callable. It will be called everytime a fixture is about to be created by `pytest_cases` on your behalf. The fixture function is passed as the argument of the hook, and the hook should return it as the result. +As per version `1.14`, all the above functions now support passing a `hook` argument. This argument should be a callable. It will be called every time a fixture is about to be created by `pytest_cases` on your behalf. The fixture function is passed as the argument of the hook, and the hook should return it as the result. You can use this fixture to better understand which fixtures are created behind the scenes, and also to decorate the fixture functions before they are created. For example you can use `hook=saved_fixture` (from [`pytest-harvest`](https://smarie.github.io/python-pytest-harvest/)) in order to save the created fixtures in the fixture store. diff --git a/src/pytest_cases/case_parametrizer_new.py b/src/pytest_cases/case_parametrizer_new.py index 8356e850..4aa6ce50 100644 --- a/src/pytest_cases/case_parametrizer_new.py +++ b/src/pytest_cases/case_parametrizer_new.py @@ -90,7 +90,7 @@ def parametrize_with_cases(argnames, # type: Union[str, List[str] `test__cases.py` or if not found, `cases_.py`, where `test_` is the current module name. Finally, the `cases` argument also accepts an explicit case function, cases-containing class, module or module name; - or a list of such elements. Note that both absolute and relative module names are suported. + or a list of such elements. Note that both absolute and relative module names are supported. Note that `@parametrize_with_cases` collection and parameter creation steps are strictly equivalent to `get_all_cases` + `get_parametrize_args`. This can be handy for debugging purposes. @@ -469,7 +469,7 @@ def case_to_argvalues(host_class_or_module, # type: Union[Type, ModuleType] if debug: case_fun_str = qname(case_fun.func if isinstance(case_fun, functools.partial) else case_fun) print("Case function %s > fixture_ref(%r) with marks %s" % (case_fun_str, fix_name, remaining_marks)) - # return a lengh-1 tuple because there is a single case created + # return a length-1 tuple because there is a single case created return (make_marked_parameter_value((argvalues,), marks=remaining_marks) if remaining_marks else argvalues,) @@ -963,7 +963,7 @@ def get_current_params(request_or_item): raise ValueError("Error: multiple values found for the same fixture parameter. Please report this issue") fixture_results_dict[fixture_name] = fixture_results_dct - # the remainder: fixtures that cant be found. + # the remainder: fixtures that can't be found. results_unknown_dict = dict() for function, results_list in results_known_fixtures_but_not_found.items(): fixture_results_dct = dict(results_list) diff --git a/src/pytest_cases/common_pytest.py b/src/pytest_cases/common_pytest.py index 82a85a9c..a0826666 100644 --- a/src/pytest_cases/common_pytest.py +++ b/src/pytest_cases/common_pytest.py @@ -364,7 +364,7 @@ def make_test_ids_from_param_values(param_names, paramids = [] for _idx, vv in enumerate(param_values): if len(vv) != nb_params: - raise ValueError("Inconsistent lenghts for parameter names and values: '%s' and '%s'" + raise ValueError("Inconsistent lengths for parameter names and values: '%s' and '%s'" "" % (param_names, vv)) _id = mini_idvalset(param_names, vv, _idx) paramids.append(_id) diff --git a/src/pytest_cases/fixture_core1_unions.py b/src/pytest_cases/fixture_core1_unions.py index 9b6e16d8..9ff239e5 100644 --- a/src/pytest_cases/fixture_core1_unions.py +++ b/src/pytest_cases/fixture_core1_unions.py @@ -286,7 +286,7 @@ def fixture_union(name, # type: str fixtures to create to represent parts of this fixture. See `unpack_fixture` for details. :param autouse: as in pytest :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :param kwargs: other pytest fixture options. They might not be supported correctly. @@ -364,7 +364,7 @@ def _fixture_union(fixtures_dest, :param unpack_into: :param autouse: :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :param caller: a function to reference for error messages @@ -468,7 +468,7 @@ def test_function(self, a, b): :param in_cls: a boolean (default False). You may wish to turn this to `True` to use this function inside a class. If you do so, you **MUST** assign the output to variables in the class. :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :return: the created fixtures. @@ -490,12 +490,12 @@ def _unpack_fixture(fixtures_dest, # type: ModuleType ): """ - :param fixtures_dest: if this is `None` the fixtures wont be registered anywhere (just returned) + :param fixtures_dest: if this is `None` the fixtures won't be registered anywhere (just returned) :param argnames: :param fixture: :param in_cls: a boolean indicating if the `self` argument should be prepended. :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :return: diff --git a/src/pytest_cases/fixture_core2.py b/src/pytest_cases/fixture_core2.py index 326ff0e8..0655f817 100644 --- a/src/pytest_cases/fixture_core2.py +++ b/src/pytest_cases/fixture_core2.py @@ -65,7 +65,7 @@ def test_uses_param(my_parameter, fixture_uses_param): :param ids: see fixture `ids` :param scope: see fixture `scope` :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :param debug: print debug messages on stdout to analyze fixture creation (use pytest -s to see them) @@ -172,7 +172,7 @@ def test_uses_param2(arg1, arg2, fixture_uses_param2): :param ids: same as `@pytest.mark.parametrize` `ids` :param scope: see fixture `scope` :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :param debug: print debug messages on stdout to analyze fixture creation (use pytest -s to see them) @@ -313,7 +313,7 @@ def fixture(scope="function", # type: str :param unpack_into: an optional iterable of names, or string containing coma-separated names, for additional fixtures to create to represent parts of this fixture. See `unpack_fixture` for details. :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :param kwargs: other keyword arguments for `@pytest.fixture` @@ -383,7 +383,7 @@ def _decorate_fixture_plus(fixture_func, :param unpack_into: an optional iterable of names, or string containing coma-separated names, for additional fixtures to create to represent parts of this fixture. See `unpack_fixture` for details. :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :param kwargs: other keyword arguments for `@pytest.fixture` @@ -470,7 +470,7 @@ def _decorate_fixture_plus(fixture_func, if marks is not None: final_values[i] = make_marked_parameter_value((final_values[i],), marks=marks) else: - # Multiple @parametrize: since pytest does not support several, we merge them with "apparence" of several + # Multiple @parametrize: since pytest does not support several, we merge them with "appearance" of several # --equivalent id final_ids = combine_ids(product(*params_ids)) # --merge all values, we'll unpack them in the wrapper below diff --git a/src/pytest_cases/fixture_parametrize_plus.py b/src/pytest_cases/fixture_parametrize_plus.py index cd155d7b..644ebefd 100644 --- a/src/pytest_cases/fixture_parametrize_plus.py +++ b/src/pytest_cases/fixture_parametrize_plus.py @@ -95,7 +95,7 @@ def _tuple_generator(request, all_fixtures): fix_at_pos_i = f_names[i] if fix_at_pos_i is None: # fixed value - # note: wouldnt it be almost as efficient but more readable to *always* call handle_lazy_args? + # note: wouldn't it be almost as efficient but more readable to *always* call handle_lazy_args? yield get_lazy_args(fixtures_or_values[i], request) if has_lazy_vals else fixtures_or_values[i] else: # fixture value @@ -532,7 +532,7 @@ def get_alternative_idx(self): return "P%sF" % self.alternative_index def get_alternative_id(self): - """Similar to SingleParamAlternative: create an id representing this tuple, since the fixture wont be + """Similar to SingleParamAlternative: create an id representing this tuple, since the fixture won't be parametrized""" if self.id is not None: # custom id from `@parametrize(ids=)` @@ -662,7 +662,7 @@ def parametrize(argnames=None, # type: Union[str, Tuple[str], List[str]] Finally, `pytest.param` is supported even when there are `fixture_ref` and `lazy_value`. An optional `hook` can be passed, to apply on each fixture function that is created during this call. The hook - function will be called everytime a fixture is about to be created. It will receive a single argument (the + function will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. @@ -687,7 +687,7 @@ def parametrize(argnames=None, # type: Union[str, Tuple[str], List[str]] :param scope: The scope of the union fixture to create if `fixture_ref`s are found in the argvalues. Otherwise same as in pytest.mark.parametrize. :param hook: an optional hook to apply to each fixture function that is created during this call. The hook function - will be called everytime a fixture is about to be created. It will receive a single argument (the function + will be called every time a fixture is about to be created. It will receive a single argument (the function implementing the fixture) and should return the function to use. For example you can use `saved_fixture` from `pytest-harvest` as a hook in order to save all such created fixtures in the fixture store. :param debug: print debug messages on stdout to analyze fixture creation (use pytest -s to see them) @@ -776,7 +776,7 @@ def _make_ids(**args): ids = _gen_ids(argnames, argvalues, idgen) if len(fixture_indices) == 0: - # No fixture refernce: fallback to a standard pytest.mark.parametrize + # No fixture reference: fallback to a standard pytest.mark.parametrize if debug: print("No fixture reference found. Calling @pytest.mark.parametrize...") print(" - argnames: %s" % initial_argnames) @@ -786,7 +786,7 @@ def _make_ids(**args): # handle infinite iterables like latest pytest, for convenience ids = resolve_ids(ids, marked_argvalues, full_resolve=False) - # no fixture reference: shortcut, do as usual (note that the hook wont be called since no fixture is created) + # no fixture reference: shortcut, do as usual (note that the hook won't be called since no fixture is created) _decorator = pytest.mark.parametrize(initial_argnames, marked_argvalues, indirect=indirect, ids=ids, scope=scope) if indirect: @@ -978,7 +978,7 @@ def parametrize_plus_decorate(test_func, fixtures_dest): f_fix_alt = _create_fixture_ref_alt(union_name=fixture_union_name, test_func=test_func, i=i) fixture_alternatives.append(f_fix_alt) else: - # argvalues[i] is a tuple, some of them being fixture_ref. create a fixture refering to all of them + # argvalues[i] is a tuple, some of them being fixture_ref. create a fixture referring to all of them prod_fix_alt = _create_fixture_ref_product(fixtures_dest, union_name=fixture_union_name, i=i, fixture_ref_positions=j_list, test_func=test_func, hook=hook) diff --git a/src/pytest_cases/plugin.py b/src/pytest_cases/plugin.py index 6688592c..22677d3a 100644 --- a/src/pytest_cases/plugin.py +++ b/src/pytest_cases/plugin.py @@ -109,7 +109,7 @@ class FixtureClosureNode(object): - its `fixture_defs` is a {name: def} ordered dict containing all fixtures AND args that are required at this node (*before* a union is required). Note that some of them have def=None when the fixture manager has no definition - for them (same beahviour than in pytest). `get_all_fixture_names` and `get_all_fixture_defs` helper functions + for them (same behaviour than in pytest). `get_all_fixture_names` and `get_all_fixture_defs` helper functions allow to either return the full ordered list (equivalent to pytest `fixture_names`) or the dictionary of non-none definitions (equivalent to pytest `arg2fixturedefs`) @@ -704,7 +704,7 @@ def insert(self, index, fixture_name): # remove those fixture definitions from all nodes in the tree self.tree.remove_fixtures(closure_tree.fixture_defs.keys()) - # finally prepend the defs at the beginning of the dictionnary in the first node + # finally prepend the defs at the beginning of the dictionary in the first node self.tree.fixture_defs = OrderedDict(list(closure_tree.fixture_defs.items()) + list(self.tree.fixture_defs.items())) @@ -1037,7 +1037,7 @@ def create_call_list_from_pending_parametrizations(self): # save the list and put back self as the _calls facade self._call_list = calls self.metafunc._calls = self - # forget about all parametrizations now - this wont happen again + # forget about all parametrizations now - this won't happen again self._pending = None @@ -1054,7 +1054,7 @@ def get_calls_for_tree(metafunc, """ pending_dct = pending_dct.copy() calls, nodes_used_by_calls = _process_node(metafunc, fix_closure_tree, pending_dct, []) - # for each call in calls, the node in nodes_used_by_calls is the coresponding tree leaf. + # for each call in calls, the node in nodes_used_by_calls is the corresponding tree leaf. _cleanup_calls_list(metafunc, fix_closure_tree, calls, nodes_used_by_calls, pending_dct) return calls @@ -1143,7 +1143,7 @@ def _cleanup_calls_list(metafunc, # _scopenum = metafunc._arg2fixturedefs[fixture_name][-1].scopenum # # # check if there is at least one call that actually uses the fixture and is not skipped... - # # this seems a bit "too much" !! > WONT FIX + # # this seems a bit "too much" !! > WON'T FIX # used = False # for i in range(nb_calls): # c, n = calls[i], nodes[i] @@ -1383,7 +1383,7 @@ def _process_node(metafunc, child_node = current_node.children[child_indices[0]] child_pending = pending.copy() - # place the childs parameter in the first position if it is in the list + # place the children parameter in the first position if it is in the list # not needed anymore - already automatic # try: # child_pending.move_to_end(child_alternative, last=False) diff --git a/tests/test_plugin_installed.py b/tests/test_plugin_installed.py index cd1619f0..c0b6ad63 100644 --- a/tests/test_plugin_installed.py +++ b/tests/test_plugin_installed.py @@ -3,5 +3,5 @@ # # License: 3-clause BSD, def test_pytest_cases_plugin_installed(request): - """A simple test to make sure that the pytest-case plugin is actually installed. Otherwise some tests wont work""" + """A simple test to make sure that the pytest-case plugin is actually installed. Otherwise some tests won't work""" assert request.session._fixturemanager.getfixtureclosure.func.__module__ == 'pytest_cases.plugin'