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

Add alternative for pytester fixture. #7

Closed
Czaki opened this issue Jan 31, 2023 · 5 comments · Fixed by #8
Closed

Add alternative for pytester fixture. #7

Czaki opened this issue Jan 31, 2023 · 5 comments · Fixed by #8

Comments

@Czaki
Copy link
Contributor

Czaki commented Jan 31, 2023

This plugin is really nice and really improves the readability of the output. But it breaks the pytester fixture https://docs.pytest.org/en/7.2.x/reference/reference.html#std-fixture-pytester

The pytester is based on parsing pytest output to determine number of failed/passed/etc.

We use the older version (testdir) in napari to validate if the fixture works correctly.
https://github.com/napari/napari/blob/f5fcb7d2e3bb32950de227df61f7bc69846a6aa4/napari/_tests/test_pytest_plugin.py

So we cannot simply add pytest-pretty to our workflow.

@samuelcolvin
Copy link
Owner

Thanks for the issue, in concrete terms, what do you need from me here?

@Czaki
Copy link
Contributor Author

Czaki commented Jan 31, 2023

Thanks for the issue, in concrete terms, what do you need from me here?

are you open for such a feature in this package (maybe implemented by someone else)?

@samuelcolvin
Copy link
Owner

I think so, but I'm a bit lost on what it really does.

If it doesn't add massive complexity, or get in the way when not using it, happy to review a PR.

@Czaki
Copy link
Contributor Author

Czaki commented Jan 31, 2023

I think so, but I'm a bit lost on what it really does.

this fixture run test provides a string and pares output to check if it runs as expected.

If it doesn't add massive complexity, or get in the way when not using it, happy to review a PR.

I will try to do this.

@samuelcolvin
Copy link
Owner

Sounds good. Happy to review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants