def test_get_con_seg_data(): rftfile = EclFiles(DATAFILE).get_rftfile() # Test the first record, it is a CON type (not multisegment) rftrecord = next(rft.rftrecords(rftfile)) con_data = rft.get_con_seg_data(rftrecord, rftfile, "CON") assert {"CONIPOS", "CONJPOS", "CONKPOS", "DEPTH", "PRESSURE", "SWAT"}.issubset(set(con_data.columns)) assert all(con_data["CONIDX"] == con_data.index + 1) with pytest.raises(ValueError): rft.get_con_seg_data(None, None, "FOO")
def test_get_con_seg_data(): """Get CON data. Later add more code here to defend the name""" rftfile = EclFiles(EIGHTCELLS).get_rftfile() # Test the first record, it is a CON type (not multisegment) rftrecord = next(rft.rftrecords(rftfile)) con_data = rft.get_con_seg_data(rftrecord, rftfile, "CON") assert {"CONIPOS", "CONJPOS", "CONKPOS", "DEPTH", "PRESSURE", "SWAT"}.issubset( set(con_data.columns) ) assert all(con_data["CONIDX"] == con_data.index + 1) with pytest.raises(ValueError): rft.get_con_seg_data(None, None, "FOO")