diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 099feab1..d6b3a7d3 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -15,7 +15,7 @@ jobs: include: - name: ubuntu - os: ubuntu-18.04 + os: ubuntu-latest - name: windows os: windows-latest @@ -62,5 +62,6 @@ jobs: - name: Test (Windows) if: runner.os == 'Windows' run: | + $Env:HDF5_DISABLE_VERSION_CHECK = 1 $Env:TYPHONTESTFILES = Join-Path $pwd "typhon-testfiles" pytest --pyargs typhon diff --git a/typhon/tests/files/test_fileset.py b/typhon/tests/files/test_fileset.py index 81e432b3..53481b60 100644 --- a/typhon/tests/files/test_fileset.py +++ b/typhon/tests/files/test_fileset.py @@ -1,11 +1,9 @@ import os -from os.path import dirname from posixpath import join # LocalFileSystem always uses / import datetime import numpy as np import pytest -import shutil import logging from typhon.files import FileHandler, FileInfo, FileSet, FileSetManager @@ -30,8 +28,10 @@ def file_system(self, request, tmp_path): from shutil import make_archive # prepare archive to test on archive = tmp_path / "test" - shutil.make_archive( - archive, "zip", os.curdir, self.refdir) + make_archive( + archive, "zip", "/" if os.path.isabs(self.refdir) else os.curdir, + self.refdir) + return ZipFileSystem(archive.with_suffix(".zip")) elif request.param == "local": from fsspec.implementations.local import LocalFileSystem diff --git a/typhon/tests/plots/test_colors.py b/typhon/tests/plots/test_colors.py index 5495a84c..48a83283 100644 --- a/typhon/tests/plots/test_colors.py +++ b/typhon/tests/plots/test_colors.py @@ -92,7 +92,7 @@ def test_cmap_from_txt(self): viridis = plt.get_cmap('viridis') cmap = colors.cmap_from_txt(os.path.join( - self.ref_dir, 'viridis.txt'), name="viridis_read") + self.ref_dir, 'viridis.txt'), name="viridis_read_txt") assert np.allclose(viridis(idx), cmap(idx), atol=0.001) @@ -103,7 +103,7 @@ def test_cmap_from_act(self): viridis = plt.get_cmap('viridis') cmap = colors.cmap_from_act( - os.path.join(self.ref_dir, 'viridis.act'), name="viridis_read") + os.path.join(self.ref_dir, 'viridis.act'), name="viridis_read_act") assert np.allclose(viridis(idx), cmap(idx), atol=0.004)