diff --git a/tests/test_convert_grid_format.py b/tests/test_convert_grid_format.py index aeaafd1de..ba0f6c762 100644 --- a/tests/test_convert_grid_format.py +++ b/tests/test_convert_grid_format.py @@ -24,7 +24,7 @@ def test_convert_grid_format_egrid(tmpdir): """Convert an ECLIPSE egrid to roff""" - outfile = os.path.join(tmpdir, "reek_grid.roff") + outfile = os.path.join(str(tmpdir), "reek_grid.roff") cgf.main(["--file", RFILE1, "--output", outfile, "--mode", "grid", "--standardfmu"]) @@ -32,13 +32,11 @@ def test_convert_grid_format_egrid(tmpdir): gg = xtgeo.Grid(outfile) assert gg.nactive == 35817 - shutil.rmtree(tmpdir) - def test_convert_grid_format_restart(tmpdir): """Convert an ECLIPSE SOIL from restart to roff""" - outfile = os.path.join(tmpdir, "reek_grid.roff") + outfile = os.path.join(str(tmpdir), "reek_grid.roff") cgf.main( [ @@ -56,10 +54,8 @@ def test_convert_grid_format_restart(tmpdir): ] ) - actual_outfile = os.path.join(tmpdir, "reek_grid--soil--20000701.roff") + actual_outfile = os.path.join(str(tmpdir), "reek_grid--soil--20000701.roff") gprop = xtgeo.GridProperty(actual_outfile) assert gprop.values.mean() == pytest.approx(0.0857, abs=0.001) - - shutil.rmtree(tmpdir)