From 7d4312087afa837567a031110c42ba12eb8b8034 Mon Sep 17 00:00:00 2001 From: Filipe Fernandes Date: Thu, 15 Aug 2024 12:18:41 +0200 Subject: [PATCH] could it be the extra /? --- compliance_checker/tests/test_cli.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/compliance_checker/tests/test_cli.py b/compliance_checker/tests/test_cli.py index fefd94d2..8cb9c6dc 100644 --- a/compliance_checker/tests/test_cli.py +++ b/compliance_checker/tests/test_cli.py @@ -20,7 +20,9 @@ from .conftest import datadir, static_files -if platform.system() == "Windows": +on_windows = platform.system() == "Windows" + +if on_windows: ncconfig = ["sh", f"{os.environ['CONDA_PREFIX']}\\Library\\bin\\nc-config"] else: ncconfig = ["nc-config"] @@ -236,10 +238,6 @@ def _check_libnetcdf_version(): < 8.0 ) - @pytest.mark.skipif( - platform.system() == "Windows", - reason="NCZarr triggers a segfault on Windows.", - ) @pytest.mark.skipif( subprocess.check_output(ncconfig + ["--has-nczarr"]) != b"yes\n", reason="NCZarr is not available.", @@ -267,6 +265,9 @@ def test_nczarr_pass_through(self, zarr_url): "check_filename", # .zarr cannot pass a test that requires it to be named .nc "check_coordinate_variables_strict_monotonicity", # FIXME: I believe there is a real problem with the original test data! ] + if on_windows: + zarr_url = zarr_url.replace("///", "//") + return_value, errors = ComplianceChecker.run_checker( skip_checks=skip_checks, ds_loc=zarr_url,