Skip to content

Commit

Permalink
TPXO host URL no longer works; need to find a more reliable way to ho…
Browse files Browse the repository at this point in the history
…st TPXO for testing purposes
  • Loading branch information
zacharyburnett committed Dec 28, 2021
1 parent c8fdb47 commit 7c2f6f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
def tpxo_filename() -> Path:
with FileLock(str(TPXO_FILENAME) + '.lock'):
if not TPXO_FILENAME.exists():
# TODO find a better way to host TPXO for testing
url = 'https://www.dropbox.com/s/uc44cbo5s2x4n93/h_tpxo9.v1.tar.gz?dl=1'
extract_download(url, TPXO_FILENAME.parent, ['h_tpxo9.v1.nc'])
return TPXO_FILENAME
Expand Down
11 changes: 6 additions & 5 deletions tests/test_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
from coupledmodeldriver import Platform
from coupledmodeldriver.configure import (
ATMESHForcingJSON,
BestTrackForcingJSON,
ModelDriverJSON,
NEMSJSON,
SlurmJSON,
TidalForcingJSON,
WW3DATAForcingJSON,
)
from coupledmodeldriver.generate.adcirc.base import ADCIRCJSON
from tests import INPUT_DIRECTORY
# noinspection PyUnresolvedReferences
from tests import INPUT_DIRECTORY, tpxo_filename


def test_update():
Expand Down Expand Up @@ -157,10 +157,11 @@ def test_tidal():
with pytest.raises((FileNotFoundError, OSError)):
configuration.adcircpy_forcing

configuration['resource'] = None
configuration['constituents'] = ['q1', 'p1', 'm2']
# TODO find a better way to host TPXO for testing
# configuration['resource'] = tpxo_filename()
# configuration['constituents'] = ['q1', 'p1', 'm2']

assert list(configuration.adcircpy_forcing.active_constituents) == ['Q1', 'P1', 'M2']
# assert list(configuration.adcircpy_forcing.active_constituents) == ['Q1', 'P1', 'M2']


def test_atmesh():
Expand Down

0 comments on commit 7c2f6f3

Please sign in to comment.