Skip to content

Commit

Permalink
add a consistency check for develop.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Moodie committed May 23, 2020
1 parent 3167a68 commit 13cdeae
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/test_consistent.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# unit tests for consistent model outputs

import pytest

import sys
import os
import numpy as np

from pyDeltaRCM.deltaRCM_driver import pyDeltaRCM

# need to create a simple case of pydeltarcm object to test these functions
delta = pyDeltaRCM(input_file=os.path.join(os.getcwd(), 'tests', 'test.yaml'))


def test_bed_after_one_update():
"""
"""
delta.update()
# slice is: delta.eta[:5, 4]
print(delta.eta[:5, 4])

_exp = np.array([-1., -0.82951754, -0.9981775 , -1., -1.])
assert np.all(delta.eta[:5, 4] == pytest.approx(_exp))

0 comments on commit 13cdeae

Please sign in to comment.