diff --git a/.github/workflows/workflow-test.yml b/.github/workflows/workflow-test.yml index 75290267..02af8330 100644 --- a/.github/workflows/workflow-test.yml +++ b/.github/workflows/workflow-test.yml @@ -31,12 +31,6 @@ jobs: - name: Prepare locales shell: bash run: sudo locale-gen de_DE.UTF-8 en_GB.UTF-8 || echo windows - # - name: Prepare timezone - # uses: szenius/set-timezone@v2.0 - # with: - # timezoneLinux: Europe/Berlin - # timezoneMacos: Europe/Berlin - # timezoneWindows: W. Europe Standard Time - name: Print yadg version shell: bash run: yadg --version diff --git a/tests/test_extract.py b/tests/test_extract.py index d0231416..2529e1c7 100644 --- a/tests/test_extract.py +++ b/tests/test_extract.py @@ -23,7 +23,9 @@ def test_yadg_extractors_extract_with_metadata(filetype, infile, datadir): os.chdir(datadir) outfile = f"{infile}.nc" - ret = extract(filetype=filetype, path=infile, locale="en_GB") + ret = extract( + filetype=filetype, path=infile, locale="en_GB", timezone="Europe/Berlin" + ) # ret.to_netcdf(f"C:/Users/Kraus/Code/yadg/tests/test_extract/{outfile}", engine="h5netcdf") ref = datatree.open_datatree(outfile, engine="h5netcdf") compare_datatrees(ret, ref, thislevel=True, descend=True) diff --git a/tests/test_yadg.py b/tests/test_yadg.py index 8a4ea5d4..9b018deb 100644 --- a/tests/test_yadg.py +++ b/tests/test_yadg.py @@ -181,7 +181,17 @@ def test_yadg_preset_roundtrip_uts(datadir): ) def test_yadg_extract_with_metadata(filetype, infile, datadir): os.chdir(datadir) - command = ["yadg", "extract", filetype, infile, "test.nc", "--locale", "en_GB"] + command = [ + "yadg", + "extract", + filetype, + infile, + "test.nc", + "--locale", + "en_GB", + "--timezone", + "Europe/Berlin", + ] subprocess.run(command, check=True) assert os.path.exists("test.nc") ret = open_datatree("test.nc", engine="h5netcdf") @@ -201,7 +211,17 @@ def test_yadg_extract_with_metadata(filetype, infile, datadir): ) def test_yadg_extract_meta_only(filetype, infile, flag, datadir): os.chdir(datadir) - command = ["yadg", "extract", filetype, infile, flag, "--locale", "en_GB"] + command = [ + "yadg", + "extract", + filetype, + infile, + flag, + "--locale", + "en_GB", + "--timezone", + "Europe/Berlin", + ] subprocess.run(command, check=True) outfile = infile.split(".")[0] + ".json" assert os.path.exists(outfile)