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

Disable loading conftest when running as client #62

Merged
merged 2 commits into from
Dec 13, 2023

Conversation

JamesHutchison
Copy link
Owner

@JamesHutchison JamesHutchison commented Dec 13, 2023

One of the challenges of writing this as a pytest plugin is finding all the ways pytest sneaks in work in unexpected places. In this case, pytest apparently loads conftest files extremely early.

This disables that loading when using the plugin as a client, which, depending on the project, can be substantial and heavily mitigates the benefits of using the hot reloader.

On a real world test with slow I/O exaggerating the test times, this reduced the test time for a test from 11.6 seconds to 3 seconds.

@JamesHutchison JamesHutchison added the enhancement New feature or request label Dec 13, 2023
@JamesHutchison JamesHutchison merged commit 34c9a8c into main Dec 13, 2023
3 checks passed
@JamesHutchison JamesHutchison deleted the disable-conftest-load-on-client branch December 13, 2023 01:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant