def test_write_scen_file_world_only(tmpdir): outfile = tmpdir.join("SCENARIO.SCEN") write_scen_file(world_only, outfile) output = read_scen_file(os.path.join(outfile.dirname, outfile.basename)) assert len(world_only) == len(output) assert len(world_only.index) == len(output.index) assert len(world_only.columns) == len(output.columns) assert world_only.equals(output)
def test_write_scen_file(tmpdir): outfile = tmpdir.join("SCENARIO.SCEN") write_scen_file(rcp3pd, outfile) output = read_scen_file(os.path.join(outfile.dirname, outfile.basename)) assert len(rcp3pd) == len(output) assert len(rcp3pd["WORLD"].index) == len(output["WORLD"].index) assert len(rcp3pd["WORLD"].columns) == len(output["WORLD"].columns) assert rcp3pd["WORLD"].equals(output["WORLD"])