<s> """<STR_LIT>""" <EOL> import os <EOL> import flopy <EOL> import numpy as np <EOL> path = os . path . join ( '<STR_LIT:..>' , '<STR_LIT>' , '<STR_LIT:data>' , '<STR_LIT>' ) <EOL> pthgw = os . path . join ( '<STR_LIT:..>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) <EOL> cpth = os . path . join ( '<STR_LIT>' ) <EOL> mf_items = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> pths = [ path , pthgw ] <EOL> def load_str ( mfnam , pth ) : <EOL> m = flopy . modflow . Modflow . load ( mfnam , model_ws = pth , verbose = True ) <EOL> assert m . load_fail is False <EOL> m . model_ws = cpth <EOL> m . write_input ( ) <EOL> pth = os . path . join ( cpth , '<STR_LIT>' . format ( m . name ) ) <EOL> str2 = flopy . modflow . ModflowStr . load ( pth , m ) <EOL> for name in str2 . dtype . names : <EOL> assert np . array_equal ( str2 . stress_period_data [ <NUM_LIT:0> ] [ name ] , m . str . stress_period_data [ <NUM_LIT:0> ] [ name ] ) is True <EOL> for name in str2 . dtype2 . names : <EOL> assert np . array_equal ( str2 . segment_data [ <NUM_LIT:0> ] [ name ] , m . str . segment_data [ <NUM_LIT:0> ] [ name ] ) is True <EOL> return <EOL> def test_mf2005load ( ) : <EOL> for namfile , pth in zip ( mf_items , pths ) : <EOL> yield load_str , namfile , pth <EOL> return <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> for namfile , pth in zip ( mf_items , pths ) : <EOL> load_str ( namfile , pth ) </s>
