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 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
|
||||
it with ``fixturedef.cached_result is not None``. If you ``del`` the attribute,
|
||||
set it to ``None`` instead.
|
||||
|
|
|
@ -130,8 +130,6 @@ def pytest_addoption(parser):
|
|||
metavar="nodeid_prefix",
|
||||
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(
|
||||
"--confcutdir",
|
||||
dest="confcutdir",
|
||||
|
|
|
@ -262,7 +262,7 @@ class MonkeyPatch:
|
|||
# A call to syspathinsert() usually means that the caller wants to
|
||||
# import some dynamically created files, thus with python3 we
|
||||
# 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
|
||||
# this case already) gets not invalidated when writing the new files
|
||||
# quickly afterwards.
|
||||
|
|
|
@ -1074,9 +1074,7 @@ def test_reprcompare_notin():
|
|||
|
||||
|
||||
def test_reprcompare_whitespaces():
|
||||
config = mock_config()
|
||||
detail = plugin.pytest_assertrepr_compare(config, "==", "\r\n", "\n")
|
||||
assert detail == [
|
||||
assert callequal("\r\n", "\n") == [
|
||||
r"'\r\n' == '\n'",
|
||||
r"Strings contain only whitespace, escaping them using repr()",
|
||||
r"- '\n'",
|
||||
|
|
Loading…
Reference in New Issue