From 7522d3121f8ff74acde3f6b70d4ef9594ad2cc8e Mon Sep 17 00:00:00 2001 From: R-Palazzo Date: Thu, 2 Nov 2023 09:21:53 -0600 Subject: [PATCH] assert_called_once --- sdmetrics/reports/multi_table/_properties/__init__.py | 2 +- .../multi_table/_properties/test_relationship_validity.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdmetrics/reports/multi_table/_properties/__init__.py b/sdmetrics/reports/multi_table/_properties/__init__.py index 34e0b21d..2483e59f 100644 --- a/sdmetrics/reports/multi_table/_properties/__init__.py +++ b/sdmetrics/reports/multi_table/_properties/__init__.py @@ -22,6 +22,6 @@ 'InterTableTrends', 'Synthesis', 'Structure', - 'DataValidity' + 'DataValidity', 'RelationshipValidity', ] diff --git a/tests/unit/reports/multi_table/_properties/test_relationship_validity.py b/tests/unit/reports/multi_table/_properties/test_relationship_validity.py index 7d7d27cd..b984c574 100644 --- a/tests/unit/reports/multi_table/_properties/test_relationship_validity.py +++ b/tests/unit/reports/multi_table/_properties/test_relationship_validity.py @@ -173,7 +173,7 @@ def test_get_score( assert score == 0.5 progress_bar.update.assert_called() - assert progress_bar.update.call_count == 1 + progress_bar.update.assert_called_once() mock_compute_average.assert_called_once() pd.testing.assert_frame_equal(relationship_validity.details, expected_details_property) @@ -218,7 +218,7 @@ def test_get_score_raises_errors( assert pd.isna(score) pd.testing.assert_frame_equal(relationship_validity.details, expected_details_property) progress_bar.update.assert_called() - assert progress_bar.update.call_count == 1 + progress_bar.update.assert_called_once() def test_get_details_with_table_name(self): """Test the ``get_details`` method.