diff --git a/compliance_checker/tests/test_cli.py b/compliance_checker/tests/test_cli.py index f71dd68a..61e74cdb 100644 --- a/compliance_checker/tests/test_cli.py +++ b/compliance_checker/tests/test_cli.py @@ -219,9 +219,9 @@ def test_multi_checker_return_value(self, tmp_txt_file): assert not return_value def _check_libnetcdf_version(): - try: - print("trying") - v = ( + if platform.system() == "Linux": + # nc-config doesn't work on windows... and neither does NCZarr so this skipif is mutually exclusive to the OS check skipif + return ( float( subprocess.check_output( ["nc-config", "--version"], encoding="UTF-8" @@ -229,10 +229,7 @@ def _check_libnetcdf_version(): ) < 8.0 ) - print(v) - return v - except FileNotFoundError as e: - print(f"WARNING: {e}\nSkipping NCZarr tests") + else: return True # TODO uncomment the third parameter once S3 support is working