From 94a80a1c251181d0c6763f6abf147789836a2fbf Mon Sep 17 00:00:00 2001 From: R-Palazzo Date: Thu, 20 Jul 2023 15:31:03 +0100 Subject: [PATCH] modify integration test --- .../reports/single_table/_properties/test_synthesis.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/reports/single_table/_properties/test_synthesis.py b/tests/integration/reports/single_table/_properties/test_synthesis.py index 0ef7dd29..4473b423 100644 --- a/tests/integration/reports/single_table/_properties/test_synthesis.py +++ b/tests/integration/reports/single_table/_properties/test_synthesis.py @@ -20,14 +20,16 @@ def test_get_score(self): assert score == 0.5 def test_get_score_error(self): - """Test the ``get_score`` method with an error.""" + """Test the ``get_score`` method with an error. + + Give an empty synthetic data to get an error. + """ # Setup real_data, _, metadata = load_demo('single_table') - real_data['start_date'].iloc[0] = 'Err' # Run synthesis_property = Synthesis() - score = synthesis_property.get_score(real_data.iloc[:20], real_data.iloc[10:30], metadata) + score = synthesis_property.get_score(real_data.iloc[:20], [], metadata) # Assert assert pd.isna(score) @@ -37,7 +39,7 @@ def test_get_score_error(self): 'Score': np.nan, 'Num Matched Rows': np.nan, 'Num New Rows': np.nan, - 'Error': 'Error: ValueError "Timestamp" is not a supported function' + 'Error': "Error: AttributeError 'list' object has no attribute 'columns'" }, index=[0]) pd.testing.assert_frame_equal(synthesis_property._details, expected_details)