Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow traces to not be captured by pytest and shown during ape test #2138

Open
antazoey opened this issue Jun 13, 2024 · 1 comment
Open
Labels
category: feature New feature or request

Comments

@antazoey
Copy link
Member

Overview

Pytest by default captures all output and it will not show you anything until the end of a failed test session.
However, there are times when a user may want to see traces of calls such as by using show_trace=True on calls made during tests.
The issue is that no trace will be shown because pytest captures it and tests pass.

Specification

Kind of tricky, but here is what I am thinking...
The class that is responsible for outputing traces does have access to the ._test_runner... I am pretty sure... so have it check for the caplog plugin and disable it during the showing of the trace and then re-enable it.

Potential Issues

it has the potential if disrupting our own tests which check for certain traces being outputed, but i know we use the file based approach because of other reasons so maybe it wont be a problem.

@antazoey antazoey added the category: feature New feature or request label Jun 13, 2024
Copy link

linear bot commented Jun 13, 2024

@antazoey antazoey changed the title Allow traces to always show during ape test Allow traces to not be captured by pytest and shown during ape test Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant