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

test: local http server for tests #1010

Merged
merged 25 commits into from
Oct 26, 2023
Merged

test: local http server for tests #1010

merged 25 commits into from
Oct 26, 2023

Conversation

lobis
Copy link
Collaborator

@lobis lobis commented Oct 25, 2023

Add a local http server pytest fixture. The http server is the python built-in but the request handler comes from https://github.com/danvk/RangeHTTPServer since the python one does not handle range requests. This handler also supports multipart range header requests!

The current implementation serves files from the skhep_testdata cache directory and downloads them on demand (only once) via calls to skhep_testdata.data_path.

There is an open issue to add this to python: python/cpython#86809.

I replaced most of the previous instances of remote http access by this local server but not all of them.

This PR also enables back some tests that were marked as skip due to network issues.

@lobis lobis mentioned this pull request Oct 25, 2023
@lobis lobis marked this pull request as ready for review October 25, 2023 23:17
@agoose77
Copy link
Collaborator

agoose77 commented Oct 26, 2023

This particular package isn't super well-maintained (it has a single maintainer who's expressed an interest in handing off to someone else). However, it's also a very simple, self-contained part of the test system, and there is interest from another developer in maintaining. We could probably just vendor it in future, if we need to. So, on the balance of cost-tradeoffs, I think this is a sensible inclusion. It gets my approval — but definitely wait for Jim's review, too.

@lobis lobis merged commit 3341ce0 into main Oct 26, 2023
21 checks passed
@lobis lobis deleted the tests-local-file-server branch October 26, 2023 16:58
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 this pull request may close these issues.

2 participants