Skip to content

Commit

Permalink
fix: Renaming TERRA products with new name standard
Browse files Browse the repository at this point in the history
  • Loading branch information
castelao committed Oct 6, 2023
1 parent 03b79c3 commit 5ba4287
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_parse_filename_AL3m():
def test_OceanColorDB():
db = OceanColorDB(os.getenv("NASA_USERNAME"), os.getenv("NASA_PASSWORD"))
db.backend = FileSystem("./")
ds = db["T2004006.L3m_DAY_CHL_chlor_a_4km.nc"]
ds = db["TERRA_MODIS.2004006.L3m_DAY_CHL_chlor_a_4km.nc"]
ds.attrs


Expand All @@ -73,21 +73,20 @@ def test_contains():

# Check something that exists
# Be sure that is was available or download it first
filename = "T2004006.L3m_DAY_CHL_chlor_a_4km.nc"
filename = "TERRA_MODIS.2004006.L3m_DAY_CHL_chlor_a_4km.nc"
ds = db[filename]
# then check (confirm) that it is available
assert filename in db


@pytest.mark.skip()
def test_serialize_OceanColorDB():
"""Test if a OceanColorDB item is serializeable
This is required to transport between processes, threads and queues.
"""
db = OceanColorDB(os.getenv("NASA_USERNAME"), os.getenv("NASA_PASSWORD"))
db.backend = FileSystem("./")
ds = db["T2004006.L3m_DAY_CHL_chlor_a_4km.nc"]
ds = db["TERRA_MODIS.20040106.L3m.DAY.CHL.chlor_a.4km.nc"]
ds2 = pickle.loads(pickle.dumps(ds.compute()))

assert ds == ds2
Expand Down

0 comments on commit 5ba4287

Please sign in to comment.