Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions autotest/t011_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import os
import flopy
import numpy as np
from nose.tools import raises


def test_mflistfile():
Expand Down Expand Up @@ -55,6 +56,36 @@ def test_mflistfile():

return

def test_mflist_reducedpumping():
'''
test reading reduced pumping data from list file
'''
pth = os.path.join('..', 'examples', 'data', 'mfusg_test',
'03B_conduit_unconfined', 'output')
list_file = os.path.join(pth, 'ex3B.lst')
mflist = flopy.utils.MfusgListBudget(list_file)
assert isinstance(mflist.get_reduced_pumping(), np.recarray)

return

@raises(AssertionError)
def test_mflist_reducedpumping_fail():
'''
test failure for reading reduced pumping data from list file
'''
pth = os.path.join('..', 'examples', 'data', 'mfusg_test',
'03A_conduit_unconfined', 'output')
list_file = os.path.join(pth, 'ex3A.lst')
# Catch before flopy to avoid masking file not found assert
if not os.path.isfile(list_file):
msg = '{} {}'.format(list_file, 'not found')
raise FileNotFoundError(msg)
mflist = flopy.utils.MfusgListBudget(list_file)
mflist.get_reduced_pumping()

return

if __name__ == '__main__':
test_mflistfile()
test_mflist_reducedpumping()
test_mflist_reducedpumping_fail()
1 change: 0 additions & 1 deletion examples/data/mfusg_test/03B_conduit_unconfined/ex3B.nam
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,3 @@ DATA(BINARY) 30 ex3B.hds
DATA(BINARY) 31 ex3B.ddn
DATA(BINARY) 35 ex3B.cln.cbb
DATA(BINARY) 36 ex3B.cln.hds
DATA 55 ex3B.cln.afr
2 changes: 1 addition & 1 deletion examples/data/mfusg_test/03B_conduit_unconfined/ex3B.wel
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1 50 autoflowreduce iunitafr 55
1 50 autoflowreduce iunitafr 7
0 0 1 Stress Period 1
1 -62840.
Loading