Skip to content

Commit e32c50b

Browse files
committed
Save file to temporary path instead of changing directory
1 parent d36b6f3 commit e32c50b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/astro_image_display_api/api_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import numbers
2-
import os
32

43
import numpy as np
54
import pytest
@@ -829,8 +828,6 @@ def test_all_methods_accept_additional_kwargs(self, data, catalog, tmp_path):
829828
Make sure all methods accept additional keyword arguments
830829
that are not defined in the protocol.
831830
"""
832-
# Run in a temperature directory since we are saving an image
833-
os.chdir(tmp_path)
834831
from astro_image_display_api import ImageViewerInterface
835832

836833
all_methods_and_attributes = ImageViewerInterface.__protocol_attrs__
@@ -851,7 +848,7 @@ def test_all_methods_accept_additional_kwargs(self, data, catalog, tmp_path):
851848
set_cuts=(10, 100),
852849
set_stretch=LogStretch(),
853850
set_colormap="viridis",
854-
save="test.png",
851+
save=tmp_path / "test.png",
855852
load_catalog=catalog,
856853
)
857854

0 commit comments

Comments
 (0)