Skip to content

Commit d94e28b

Browse files
committed
Make really sure the path contains nothing that could be interpreted as a date
1 parent 149da4f commit d94e28b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tests/unit/data_finder/test_get_start_end_year.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ def test_get_start_end_year(case):
3030
assert case_end == end
3131

3232

33-
def test_read_time_from_cube(tmp_path):
33+
def test_read_time_from_cube(monkeypatch, tmp_path):
3434
"""Try to get time from cube if no date in filename"""
35-
temp_file = str(tmp_path / 'test.nc')
35+
monkeypatch.chdir(tmp_path)
36+
temp_file = 'test.nc'
3637
cube = iris.cube.Cube([0, 0], var_name='var')
3738
time = iris.coords.DimCoord([0, 366],
3839
'time',

0 commit comments

Comments
 (0)