def test_parse_well(inputlines, expected): if "DATE" in expected: expected["DATE"] = pd.to_datetime(expected["DATE"]) expected.set_index(["WELL", "DATE"], inplace=True) # Assume there is DATE line in the test input inputlines = ofmvol2csv.cleanse_ofm_lines(inputlines) colnames = ofmvol2csv.extract_columnnames(inputlines) dframe = ofmvol2csv.parse_well(inputlines[1:], colnames) pd.testing.assert_frame_equal(dframe, expected)
def test_cleanse_ofm_lines(filelines, expected): """Test cleanup of lines in OFM file format""" assert ofmvol2csv.cleanse_ofm_lines(filelines) == expected
def test_cleanse_ofm_lines(filelines, expected): assert ofmvol2csv.cleanse_ofm_lines(filelines) == expected