-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rename network -> requires_network to be more consistent with other t…
…est decorators
- Loading branch information
1 parent
498565e
commit ff64960
Showing
4 changed files
with
15 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,23 @@ | ||
import pytest | ||
|
||
from xarray import Dataset | ||
|
||
from virtualizarr import open_virtual_dataset | ||
from virtualizarr.tests import network, requires_kerchunk | ||
|
||
from virtualizarr.tests import requires_kerchunk, requires_network | ||
|
||
pytest.importorskip("astropy") | ||
|
||
|
||
@requires_kerchunk | ||
@network | ||
@requires_network | ||
def test_open_hubble_data(): | ||
# data from https://registry.opendata.aws/hst/ | ||
vds = open_virtual_dataset( | ||
"s3://stpubdata/hst/public/f05i/f05i0201m/f05i0201m_a1f.fits", | ||
reader_options={'storage_options': {'anon': True}} | ||
reader_options={"storage_options": {"anon": True}}, | ||
) | ||
|
||
assert isinstance(vds, Dataset) | ||
assert list(vds.variables) == ['PRIMARY'] | ||
var = vds['PRIMARY'].variable | ||
assert var.sizes == {'y': 17, 'x': 589} | ||
assert var.dtype == '>i4' | ||
assert list(vds.variables) == ["PRIMARY"] | ||
var = vds["PRIMARY"].variable | ||
assert var.sizes == {"y": 17, "x": 589} | ||
assert var.dtype == ">i4" |