Skip to content
This repository has been archived by the owner on Oct 4, 2021. It is now read-only.

Commit

Permalink
noaa coops tests update
Browse files Browse the repository at this point in the history
  • Loading branch information
georgebv committed Sep 1, 2019
1 parent 3bec20e commit 3d9a3f2
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions tests/data/test_noaa_coops.py
@@ -1,7 +1,5 @@
from coastlib.data.noaa_coops import coops_api, coops_api_batch, coops_datum
import numpy as np
import sys
import io


def test_coops_api_basic():
Expand Down Expand Up @@ -37,16 +35,10 @@ def test_coops_api_batch_basic():


def test_coops_api_batch_custom():
stdout_ = sys.stdout
stream = io.StringIO()
sys.stdout = stream
df, logs = coops_api_batch(
station=8518750, begin_date='20130101', end_date='20130307', product='water_level', datum='NAVD',
return_logs=True, echo_progress=True
)
sys.stdout = stdout_
assert stream.getvalue()[:80] == 'NOAA CO-OPS 0% [0 ] 0/3 [ETA: '
assert stream.getvalue()[-120:-60] == ' 100% [##################################################] 3'

assert len(df) == 15601
assert np.allclose(df.mean().values, np.array([-0.33339863, 0.1075654]))
Expand Down

0 comments on commit 3d9a3f2

Please sign in to comment.