Skip to content

Commit

Permalink
modify integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Jul 20, 2023
1 parent 87ea60d commit 94a80a1
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)

0 comments on commit 94a80a1

Please sign in to comment.