Skip to content

Commit

Permalink
tests better setup
Browse files Browse the repository at this point in the history
  • Loading branch information
albertz committed Jan 11, 2024
1 parent c22aefe commit 81510a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/_setup_test_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def pytest_unconfigure(self, config):
while frame_:
assert isinstance(frame_, types.FrameType)
# If pytest_cmdline_main is in the call stack trace, we are not yet in the lowest stack.
if get_func_str_from_code_object(frame_.f_code) == "pytest_cmdline_main":
if get_func_str_from_code_object(frame_.f_code, frame=frame_) == "pytest_cmdline_main":
# We assume there is yet another lower `finally` block in the call stack
# which calls to config._ensure_unconfigure.
# However, it would not call pytest_unconfigure again
Expand Down

0 comments on commit 81510a2

Please sign in to comment.