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

Suggestion: pytest-vcr for reliable testing #34

Open
jamesbraza opened this issue Nov 2, 2023 · 2 comments
Open

Suggestion: pytest-vcr for reliable testing #34

jamesbraza opened this issue Nov 2, 2023 · 2 comments

Comments

@jamesbraza
Copy link
Contributor

I believe the test suite is actually making requests to Entrez each time it's run.

To fix this, I suggest using pytest-vcr, a pytest plug-in for caching the response of requests in a subfolder of the test folder.

It's very easy to use, and may help with the seeming flakiness of CI at the moment

@krassowski
Copy link
Owner

This is a good idea, though it would be best if one of the jobs was not cached (while the other were). Also, requests-cache may be preferable as it is a bit more established.

@jamesbraza
Copy link
Contributor Author

Oh wow, requests-cache is a TIL for me, thanks!

And yeah, it's up to you, was just a suggestion as I noticed CI is somewhat flaky.

Maybe instead of caching for all but one job, it'd be more preferable to set up a weekly CI job using schedule that updates the cached responses.

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

No branches or pull requests

2 participants