Skip to content

Commit

Permalink
Update conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nabobalis authored Dec 7, 2024
1 parent 63ed374 commit 67d860d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions sunkit_image/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import tempfile
import warnings
from pathlib import Path
import importlib.util

import numpy as np
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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"]


Expand Down

0 comments on commit 67d860d

Please sign in to comment.