From eecf7e2a9c2df2b86b0693a3e68a50fba3dba97c Mon Sep 17 00:00:00 2001 From: R-Palazzo Date: Mon, 24 Jun 2024 12:50:33 +0100 Subject: [PATCH] fix rounding between versions --- .../multi_table/_properties/test_column_pair_trends.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration/reports/multi_table/_properties/test_column_pair_trends.py b/tests/integration/reports/multi_table/_properties/test_column_pair_trends.py index 3a64d6d6..65438403 100644 --- a/tests/integration/reports/multi_table/_properties/test_column_pair_trends.py +++ b/tests/integration/reports/multi_table/_properties/test_column_pair_trends.py @@ -1,5 +1,6 @@ from unittest.mock import Mock +import numpy as np from tqdm import tqdm from sdmetrics.demos import load_demo @@ -17,7 +18,7 @@ def test_end_to_end(self): result = column_pair_trends.get_score(real_data, synthetic_data, metadata) # Assert - assert result == 0.4565462958352109 + assert np.isclose(result, 0.45654629583521095, atol=1e-8) def test_with_progress_bar(self): """Test that the progress bar is correctly updated.""" @@ -37,5 +38,5 @@ def test_with_progress_bar(self): result = column_pair_trends.get_score(real_data, synthetic_data, metadata, progress_bar) # Assert - assert result == 0.4565462958352109 + assert np.isclose(result, 0.45654629583521095, atol=1e-8) assert mock_update.call_count == num_iter