From 0a48088cffb665f5a3e7962a2244f197e7941052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oriol=20Tint=C3=B3?= <oriol.tinto@lmu.de> Date: Wed, 14 Jun 2023 14:31:32 +0200 Subject: [PATCH] Fix custom metric test constrains. --- tests/test_analyzer.py | 2 +- tests/test_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_analyzer.py b/tests/test_analyzer.py index 6e8b4ab..f3ff8ef 100644 --- a/tests/test_analyzer.py +++ b/tests/test_analyzer.py @@ -115,7 +115,7 @@ class TestAnalyzer(TestClass): # Check that the analysis using a custom metric defined with a plugin works datasets = ["dataset_%iD.nc" % dimension for dimension in range(1, 4)] - constrains = f"{custom_metric_name}:3" + constrains = f"{custom_metric_name}:.1" for ds in datasets: input_path = input_tempdir / ds diff --git a/tests/test_cli.py b/tests/test_cli.py index f276b18..03adcb6 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -102,7 +102,7 @@ class TestCommandLineInterface(TestClass): with open(plugin_path, "w") as f: f.write(function_code) - commands = ["_", "analyze", str(file_path), "--constrains", f"{plugin_name}:4", "--plugins", + commands = ["_", "analyze", str(file_path), "--constrains", f"{plugin_name}:.1", "--plugins", str(plugin_path), "-c", "zfp"] mocker.patch("sys.argv", commands) enstools.compression.cli.main() -- GitLab