diff --git a/tests/metrics/test_attacks.py b/tests/metrics/test_attacks.py index 241a6c3c..a2ac2f2e 100644 --- a/tests/metrics/test_attacks.py +++ b/tests/metrics/test_attacks.py @@ -1,4 +1,5 @@ # stdlib +import sys from typing import Type # third party @@ -14,16 +15,21 @@ from synthcity.plugins import Plugins from synthcity.plugins.core.dataloader import GenericDataLoader - -@pytest.mark.parametrize("reduction", ["mean", "max", "min"]) -@pytest.mark.parametrize( - "evaluator_t", - [ +# Define parameters for different OSes +if sys.platform == "darwin": # macOS + reduction_params = ["mean"] # Only run "mean" on macOS + evaluator_params = [DataLeakageLinear] # Only run this evaluator on macOS +else: # Linux and Windows + reduction_params = ["mean", "max", "min"] # Run all on Linux/Windows + evaluator_params = [ DataLeakageLinear, DataLeakageXGB, DataLeakageMLP, - ], -) + ] # All evaluators + + +@pytest.mark.parametrize("reduction", reduction_params) +@pytest.mark.parametrize("evaluator_t", evaluator_params) def test_reduction(reduction: str, evaluator_t: Type) -> None: X, y = load_diabetes(return_X_y=True, as_frame=True) X["target"] = y