diff --git a/sunkit_image/conftest.py b/sunkit_image/conftest.py index f1ef5dab..3596338f 100644 --- a/sunkit_image/conftest.py +++ b/sunkit_image/conftest.py @@ -2,6 +2,7 @@ import logging import tempfile import warnings +from pathlib import Path import importlib.util import numpy as np @@ -48,8 +49,8 @@ def _tmp_config_dir(request): tmpdir = tempfile.TemporaryDirectory() os.environ["SUNPY_CONFIGDIR"] = str(tmpdir.name) - astropy.config.paths.set_temp_config._temp_path = tmpdir.name - astropy.config.paths.set_temp_cache._temp_path = tmpdir.name + astropy.config.paths.set_temp_config._temp_path = Path(tmpdir.name) + astropy.config.paths.set_temp_cache._temp_path = Path(tmpdir.name) yield @@ -77,7 +78,7 @@ def tmp_dl_dir(request): """ with tempfile.TemporaryDirectory() as tmpdir: os.environ["SUNPY_DOWNLOADDIR"] = tmpdir - yield tmpdir + yield Path(tmpdir) del os.environ["SUNPY_DOWNLOADDIR"]