From 260f848c05fb2a329c12625633f9fde7da1046fb Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 26 Nov 2019 23:11:29 +0100 Subject: [PATCH 1/4] minor: remove outdated, superfluous comment --- src/_pytest/main.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index 24b29a16f..f6cb17091 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -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", From 1baeefc2fdc023ea5f0e6acf6d50afe0ba41483a Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 10 Feb 2020 07:46:46 +0100 Subject: [PATCH 2/4] test_reprcompare_whitespaces: use callequal --- testing/test_assertion.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/testing/test_assertion.py b/testing/test_assertion.py index cf80fba43..453bb2fc7 100644 --- a/testing/test_assertion.py +++ b/testing/test_assertion.py @@ -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'", From 2277817176079b5b815304195035036dad3e267f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Fri, 14 Feb 2020 19:49:08 +0100 Subject: [PATCH 3/4] Fix grammar in changelog/6737.breaking.rst --- changelog/6737.breaking.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelog/6737.breaking.rst b/changelog/6737.breaking.rst index aad661e87..e024658ba 100644 --- a/changelog/6737.breaking.rst +++ b/changelog/6737.breaking.rst @@ -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. From 47ccd58fb43ba536e81886ca662c419a6d51dc7f Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 22 Feb 2020 13:15:07 +0100 Subject: [PATCH 4/4] Fix typo in doc with syspath_prepend --- src/_pytest/monkeypatch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_pytest/monkeypatch.py b/src/_pytest/monkeypatch.py index 8aec7b818..ce1c0f651 100644 --- a/src/_pytest/monkeypatch.py +++ b/src/_pytest/monkeypatch.py @@ -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.