Skip to content
Snippets Groups Projects
Commit ce04e0dd authored by Chris Lamb's avatar Chris Lamb :eyes:
Browse files

Fix compatibility with PyTest 8.0. (Closes: #365)


@tool_required(foo) modifies global state (specifically, it adds "foo" to
a set), and we need to ensure that is unwound after we exit this function.
Thanks, FC Stegerman!

Signed-off-by: Chris Lamb's avatarChris Lamb <lamby@debian.org>
parent c09d0a9e
No related branches found
Tags 215
No related merge requests found
Pipeline #645697 passed
......@@ -219,6 +219,11 @@ def test_with_compare_details_and_tool_not_found(monkeypatch):
},
)
# @tool_required(foo) below modifies global state (specifically, it adds
# "foo" to a set), and we need to ensure that is unwound after we exit this
# function. (Re: #365)
monkeypatch.setattr(tool_required, "all", set())
class MockFile(FilesystemFile):
@tool_required("nonexistent")
def compare_details(self, other, source=None):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment