Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
nicedlp committed Sep 8, 2023
1 parent 28ce40c commit fa5c2b7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/test_unit/test_monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from formation_indus_ds_avancee.monitoring import monitor_with_io


@mark.skip("Complete monitor function and test, then remove the mark.skip")
#@mark.skip("Complete monitor function and test, then remove the mark.skip")
@patch('pandas.read_csv')
def test_monitor_with_io_should_write_predictions_mean_to_db(mocked_read_csv):
# Given
Expand All @@ -20,7 +20,7 @@ def test_monitor_with_io_should_write_predictions_mean_to_db(mocked_read_csv):
mocked_read_csv.return_value = predictions
db_con_str = 'sqlite:///test_db.db'
# Start filling expected
expected = ...
expected = pd.DataFrame({ 'predictions': [13.], 'predictions_time': [given_date]})
# End filling expected

# When
Expand All @@ -29,6 +29,7 @@ def test_monitor_with_io_should_write_predictions_mean_to_db(mocked_read_csv):
db_conn = engine.connect()
actual = pd.read_sql(f'SELECT * FROM {MONITORING_TABLE_NAME}', db_conn, parse_dates=['predictions_time'])


# Then
pd.testing.assert_frame_equal(expected, actual)
db_conn.close()
Expand Down

0 comments on commit fa5c2b7

Please sign in to comment.