Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pyresample/test/test_area_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def test_multiple_file_content(self):
self.assertEqual(results, results3)


def test_area_def_rst_list():
def test_area_def_rst_list(tmp_path):
"""Test output of rst generation from area list."""
import unittest.mock as mock

Expand Down Expand Up @@ -280,11 +280,12 @@ def test_area_def_rst_list():
lower_left_xy: [-2504688.5428486555, -5591295.9185533915]
upper_right_xy: [2504688.5428486555, -1111475.102852225]"""

with open("test_areas.yaml", "w") as file:
area_file = tmp_path / "test_areas.yaml"
with open(area_file, "w") as file:
file.write(areas)

with mock.patch('pyresample.area_config.area_repr') as mock_area_repr:
generate_area_def_rst_list("test_areas.yaml")
generate_area_def_rst_list(str(area_file))
assert mock_area_repr.call_count == 2
call_args = mock_area_repr.call_args_list
# check that static files are included for the first area
Expand Down
Loading