zarr-developers / VirtualiZarr

Create virtual Zarr stores from archival data files using xarray syntax
https://virtualizarr.readthedocs.io/en/latest/
Apache License 2.0
68 stars 10 forks source link

Mark tests which require network access #144

Closed TomNicholas closed 2 weeks ago

TomNicholas commented 2 weeks ago

Implements @scottyhq's suggestion in https://github.com/zarr-developers/VirtualiZarr/pull/143#issuecomment-2174029069.

Makes the test suite run considerably faster locally by default because you don't have to wait for the tests that access S3 to complete.

TomNicholas commented 2 weeks ago

This now works, the test that fails is the hypothesis test I added in #139.

TomNicholas commented 2 weeks ago

Actually this appears to have broken the ability to run tests using pytest - I get an error ValueError: no option named 'run_network_tests'.

I can still run the tests if I specify the directory to run from, i.e. pytest -vv ./virtualizarr works. I have no idea why because I can't see what's different about this setup compared to xarray, which doesn't have this problem 😬

TomNicholas commented 2 weeks ago

Realized the problem is here likely that conftest.py should be in the root directory...

TomNicholas commented 2 weeks ago

(yeah https://github.com/zarr-developers/VirtualiZarr/commit/4d13b35c5c816413a966b0a7f4e60da1d40e55ff fixed it)