Minor cosmetic fixes (#6792)
This commit is contained in:
commit
68fe0eb8f3
|
@ -1,7 +1,7 @@
|
||||||
The ``cached_result`` attribute of ``FixtureDef`` is now set to ``None`` when
|
The ``cached_result`` attribute of ``FixtureDef`` is now set to ``None`` when
|
||||||
the result is unavailable, instead of being deleted.
|
the result is unavailable, instead of being deleted.
|
||||||
|
|
||||||
If your plugin perform checks like ``hasattr(fixturedef, 'cached_result')``,
|
If your plugin performs checks like ``hasattr(fixturedef, 'cached_result')``,
|
||||||
for example in a ``pytest_fixture_post_finalizer`` hook implementation, replace
|
for example in a ``pytest_fixture_post_finalizer`` hook implementation, replace
|
||||||
it with ``fixturedef.cached_result is not None``. If you ``del`` the attribute,
|
it with ``fixturedef.cached_result is not None``. If you ``del`` the attribute,
|
||||||
set it to ``None`` instead.
|
set it to ``None`` instead.
|
||||||
|
|
|
@ -130,8 +130,6 @@ def pytest_addoption(parser):
|
||||||
metavar="nodeid_prefix",
|
metavar="nodeid_prefix",
|
||||||
help="deselect item (via node id prefix) during collection (multi-allowed).",
|
help="deselect item (via node id prefix) during collection (multi-allowed).",
|
||||||
)
|
)
|
||||||
# when changing this to --conf-cut-dir, config.py Conftest.setinitial
|
|
||||||
# needs upgrading as well
|
|
||||||
group.addoption(
|
group.addoption(
|
||||||
"--confcutdir",
|
"--confcutdir",
|
||||||
dest="confcutdir",
|
dest="confcutdir",
|
||||||
|
|
|
@ -262,7 +262,7 @@ class MonkeyPatch:
|
||||||
# A call to syspathinsert() usually means that the caller wants to
|
# A call to syspathinsert() usually means that the caller wants to
|
||||||
# import some dynamically created files, thus with python3 we
|
# import some dynamically created files, thus with python3 we
|
||||||
# invalidate its import caches.
|
# invalidate its import caches.
|
||||||
# This is especially important when any namespace package is in used,
|
# This is especially important when any namespace package is in use,
|
||||||
# since then the mtime based FileFinder cache (that gets created in
|
# since then the mtime based FileFinder cache (that gets created in
|
||||||
# this case already) gets not invalidated when writing the new files
|
# this case already) gets not invalidated when writing the new files
|
||||||
# quickly afterwards.
|
# quickly afterwards.
|
||||||
|
|
|
@ -1074,9 +1074,7 @@ def test_reprcompare_notin():
|
||||||
|
|
||||||
|
|
||||||
def test_reprcompare_whitespaces():
|
def test_reprcompare_whitespaces():
|
||||||
config = mock_config()
|
assert callequal("\r\n", "\n") == [
|
||||||
detail = plugin.pytest_assertrepr_compare(config, "==", "\r\n", "\n")
|
|
||||||
assert detail == [
|
|
||||||
r"'\r\n' == '\n'",
|
r"'\r\n' == '\n'",
|
||||||
r"Strings contain only whitespace, escaping them using repr()",
|
r"Strings contain only whitespace, escaping them using repr()",
|
||||||
r"- '\n'",
|
r"- '\n'",
|
||||||
|
|
Loading…
Reference in New Issue