Spelling and grammar fixes
This commit is contained in:
parent
e6e40db9c7
commit
22ab737243
|
@ -541,7 +541,7 @@ Bug Fixes
|
||||||
- `#3473 <https://github.com/pytest-dev/pytest/issues/3473>`_: Raise immediately if ``approx()`` is given an expected value of a type it doesn't understand (e.g. strings, nested dicts, etc.).
|
- `#3473 <https://github.com/pytest-dev/pytest/issues/3473>`_: Raise immediately if ``approx()`` is given an expected value of a type it doesn't understand (e.g. strings, nested dicts, etc.).
|
||||||
|
|
||||||
|
|
||||||
- `#3712 <https://github.com/pytest-dev/pytest/issues/3712>`_: Correctly represent the dimensions of an numpy array when calling ``repr()`` on ``approx()``.
|
- `#3712 <https://github.com/pytest-dev/pytest/issues/3712>`_: Correctly represent the dimensions of a numpy array when calling ``repr()`` on ``approx()``.
|
||||||
|
|
||||||
- `#3742 <https://github.com/pytest-dev/pytest/issues/3742>`_: Fix incompatibility with third party plugins during collection, which produced the error ``object has no attribute '_collectfile'``.
|
- `#3742 <https://github.com/pytest-dev/pytest/issues/3742>`_: Fix incompatibility with third party plugins during collection, which produced the error ``object has no attribute '_collectfile'``.
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ Issues
|
||||||
------
|
------
|
||||||
|
|
||||||
* By using ``request.getfuncargvalue()`` we rely on actual fixture function
|
* 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
|
* More importantly, ``request.getfuncargvalue()`` cannot be combined with
|
||||||
parametrized fixtures, such as ``extra_context``
|
parametrized fixtures, such as ``extra_context``
|
||||||
* This is very inconvenient if you wish to extend an existing test suite by
|
* This is very inconvenient if you wish to extend an existing test suite by
|
||||||
|
|
|
@ -386,7 +386,7 @@ return a result object, with which we can assert the tests' outcomes.
|
||||||
result.assert_outcomes(passed=4)
|
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
|
.. code:: ini
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,7 @@ class CaptureManager(object):
|
||||||
def read_global_capture(self):
|
def read_global_capture(self):
|
||||||
return self._global_capturing.readouterr()
|
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):
|
def activate_fixture(self, item):
|
||||||
"""If the current item is using ``capsys`` or ``capfd``, activate them so they take precedence over
|
"""If the current item is using ``capsys`` or ``capfd``, activate them so they take precedence over
|
||||||
|
|
|
@ -152,7 +152,7 @@ class ArgumentError(Exception):
|
||||||
class Argument(object):
|
class Argument(object):
|
||||||
"""class that mimics the necessary behaviour of optparse.Option
|
"""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
|
and ignoring choices and integer prefixes
|
||||||
https://docs.python.org/3/library/optparse.html#optparse-standard-option-types
|
https://docs.python.org/3/library/optparse.html#optparse-standard-option-types
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -618,7 +618,7 @@ class FixtureRequest(FuncargnamesCompatAttr):
|
||||||
subrequest._check_scope(argname, self.scope, scope)
|
subrequest._check_scope(argname, self.scope, scope)
|
||||||
|
|
||||||
# clear sys.exc_info before invoking the fixture (python bug?)
|
# 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()
|
exc_clear()
|
||||||
try:
|
try:
|
||||||
# call the fixture function
|
# call the fixture function
|
||||||
|
|
|
@ -41,10 +41,10 @@ def pytest_namespace():
|
||||||
Plugins whose users depend on the current namespace functionality should prepare to migrate to a
|
Plugins whose users depend on the current namespace functionality should prepare to migrate to a
|
||||||
namespace they actually own.
|
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.
|
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
|
``pytest_namespace`` hook this should be seen as a temporary measure to be removed in future versions after
|
||||||
an appropriate transition period.
|
an appropriate transition period.
|
||||||
"""
|
"""
|
||||||
|
|
|
@ -443,7 +443,7 @@ class NodeKeywords(MappingMixin):
|
||||||
@attr.s(cmp=False, hash=False)
|
@attr.s(cmp=False, hash=False)
|
||||||
class NodeMarkers(object):
|
class NodeMarkers(object):
|
||||||
"""
|
"""
|
||||||
internal strucutre for storing marks belongong to a node
|
internal structure for storing marks belonging to a node
|
||||||
|
|
||||||
..warning::
|
..warning::
|
||||||
|
|
||||||
|
|
|
@ -36,7 +36,7 @@ get_lock_path = operator.methodcaller("joinpath", ".lock")
|
||||||
|
|
||||||
def ensure_reset_dir(path):
|
def ensure_reset_dir(path):
|
||||||
"""
|
"""
|
||||||
ensures the given path is a empty directory
|
ensures the given path is an empty directory
|
||||||
"""
|
"""
|
||||||
if path.exists():
|
if path.exists():
|
||||||
rmtree(path, force=True)
|
rmtree(path, force=True)
|
||||||
|
@ -106,7 +106,7 @@ else:
|
||||||
def _force_symlink(root, target, link_to):
|
def _force_symlink(root, target, link_to):
|
||||||
"""helper to create the current symlink
|
"""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
|
for the contex of best effort linking to the latest testrun
|
||||||
|
|
||||||
the presumption being thatin case of much parallelism
|
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):
|
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):
|
for i in range(10):
|
||||||
# try up to 10 times to create the folder
|
# try up to 10 times to create the folder
|
||||||
max_existing = _max(map(parse_num, find_suffixes(root, prefix)), default=-1)
|
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.write(fd, spid)
|
||||||
os.close(fd)
|
os.close(fd)
|
||||||
if not lock_path.is_file():
|
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
|
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):
|
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):
|
if ensure_deletable(path, consider_lock_dead_if_created_before):
|
||||||
maybe_delete_a_numbered_dir(path)
|
maybe_delete_a_numbered_dir(path)
|
||||||
|
|
||||||
|
|
|
@ -661,7 +661,7 @@ class Instance(PyCollector):
|
||||||
_ALLOW_MARKERS = False # hack, destroy later
|
_ALLOW_MARKERS = False # hack, destroy later
|
||||||
# instances share the object with their parents in a way
|
# instances share the object with their parents in a way
|
||||||
# that duplicates markers instances if not taken out
|
# 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):
|
def _getobj(self):
|
||||||
return self.parent.obj()
|
return self.parent.obj()
|
||||||
|
@ -1343,7 +1343,7 @@ class Function(FunctionMixin, nodes.Item, fixtures.FuncargnamesCompatAttr):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
_genid = None
|
_genid = None
|
||||||
# disable since functions handle it themselfes
|
# disable since functions handle it themselves
|
||||||
_ALLOW_MARKERS = False
|
_ALLOW_MARKERS = False
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
|
|
Loading…
Reference in New Issue