def test_output_by_id(): pfs = Pfs("tests/testdata/lake.sw") df = pfs.get_outputs(section="SPECTRAL_WAVE_MODULE", included_only=False) # .loc refers to output_id irrespective of included or not assert df.loc[3]["file_name"] == "Waves_x20km_y20km.dfs0" df_inc = pfs.get_outputs(section="SPECTRAL_WAVE_MODULE", included_only=True) # .loc refers to output_id irrespective of included or not assert df_inc.loc[3]["file_name"] == "Waves_x20km_y20km.dfs0"
def test_included_outputs(): pfs = Pfs("tests/testdata/lake.sw") df = pfs.get_outputs(section="SPECTRAL_WAVE_MODULE", included_only=True) assert df["file_name"][1] == "Wave_parameters.dfsu" assert df.shape[0] == 3
def test_outputs(): pfs = Pfs("tests/testdata/lake.sw") df = pfs.get_outputs(section="SPECTRAL_WAVE_MODULE") assert df["file_name"][1] == "Wave_parameters.dfsu"