Skip to content

Commit

Permalink
Disable pytest-pystack for test depending on pytester fixture
Browse files Browse the repository at this point in the history
Signed-off-by: Grzegorz Bokota <[email protected]>
  • Loading branch information
Czaki committed Apr 12, 2024
1 parent 77e9a06 commit 52190c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

A pytest plug-in for easy integration of PyStack in your test suite.

It can be used to automatically dump the stack trace of a hanging test in your suite.
It can be used to automatically dump the stack trace of a hanging test in your suite (with exception to test using `pytester` fixture).

See [PyStack](https://github.com/bloomberg/pystack) for further information about the tool.

Expand Down
2 changes: 1 addition & 1 deletion src/pytest_pystack/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def pytest_addoption(parser) -> None:

@pytest.hookimpl
def pytest_runtest_makereport(item, call):
if call.when in {"setup", "teardown"} and item.config._pystack_queue:
if call.when in {"setup", "teardown"} and item.config._pystack_queue and "pytester" not in item.fixturenames:
item.config._pystack_queue.put(item.name)


Expand Down

0 comments on commit 52190c3

Please sign in to comment.