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

Shutting down patching during pytest report logging shall be more reliable #908

Open
mrbean-bremen opened this issue Nov 12, 2023 · 0 comments

Comments

@mrbean-bremen
Copy link
Member

This is a spin-off of #904. From the comments:

mrbean-bremen commented Nov 12, 2023

@RonnyPfannschmidt - thanks, that worked exactly as you wrote, I'll probably merge this tomorrow if nobody objects. Sorry about the long delay - I wanted to finish a minor issue in another project first, but that took unexpectedly long.

One question though: I used pytest_runtest_logreport with tryfirst. If anyone else uses the same hook also with tryfirst and wants to access the filesystem in that hook, that might or might not work, depending on the order the hooks are called (if I understand that correctly). Is this something I just have to live with (as it is unlikely to happen), or is there a canocical way to handle this?

RonnyPfannschmidt commented Nov 12, 2023

Currently there's no explicit order, I recommend a tryfirst hook wrapper as starting point plus logged a issue that's dependents on The pluggy issues about more explicit ordering


There are some issues in pluggy related to ordering, the first being this issue.

This is a reminder to use the improved mechanism to ensure that pyfakefs is paused before other implementer of the reporting hook are involved, if such a mechanism will be added.

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

No branches or pull requests

1 participant