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

replace pytest-xprocess #2963

Merged
merged 4 commits into from
Oct 27, 2024
Merged

replace pytest-xprocess #2963

merged 4 commits into from
Oct 27, 2024

Conversation

davidism
Copy link
Member

Directly manage the dev server subprocess instead of using pytest-xprocess. While this adds some code, overall it's less complex than how pytest-xprocess works, and we didn't seem to need those complexities. I found it's easier to step through and access the different parts during a test if needed. It's also easier to start the server and use the client outside of a pytest session, if we need to debug something really tricky and don't want to deal with pytest. Calling proc.wait() after proc.terminate() ensures we don't seen any resource warnings, so those ignores can be removed. The tests seem to run about 1-2 seconds faster on my machine.

closes #2906

@davidism davidism added this to the 3.1.0 milestone Oct 27, 2024
@davidism
Copy link
Member Author

@sp6370 I finally found time to finish investigating this, and got it all working. Thanks for your work during the sprint, I credited you with co-authored-by in the first commit based on all that.

@davidism davidism merged commit 2ed6d7e into main Oct 27, 2024
12 checks passed
@davidism davidism deleted the subprocess branch October 27, 2024 16:15
@sp6370
Copy link
Contributor

sp6370 commented Oct 27, 2024

@davidism Thanks a lot for wrapping this. I was able to learn a lot through this. Looking forward to seeing you at the next PyCon. 😄

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

replace pytest-xprocess
2 participants