From 2aae718e5af8111e31aafcecd31d2480796bcba8 Mon Sep 17 00:00:00 2001 From: vitor-aignosi Date: Mon, 25 Aug 2025 09:16:47 -0300 Subject: [PATCH] SIENTIAPDE-1193 Enhance test cases to include datetime_columns for improved timestamp handling in minimal_retrain and predictions_batch functions --- coverage.sh | 1 + tests/orchestrator/utils/test_orchestrator_functions.py | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 coverage.sh diff --git a/coverage.sh b/coverage.sh new file mode 100755 index 0000000..c3235b5 --- /dev/null +++ b/coverage.sh @@ -0,0 +1 @@ +pytest --cov=orchestrator --cov-report=html && xdg-open htmlcov/index.html \ No newline at end of file diff --git a/tests/orchestrator/utils/test_orchestrator_functions.py b/tests/orchestrator/utils/test_orchestrator_functions.py index eb4b056..09fae10 100644 --- a/tests/orchestrator/utils/test_orchestrator_functions.py +++ b/tests/orchestrator/utils/test_orchestrator_functions.py @@ -41,6 +41,7 @@ def test_minimal_retrain(): "name": "test_model_name" }, "query": "select * from sientia_data.laborious_data order by \"timestamp\" desc limit 30;", + "datetime_columns": ["timestamp"] } result = minimal_retrain(config) expected = { @@ -53,6 +54,7 @@ def test_minimal_retrain(): "query": "select * from sientia_data.laborious_data order by \"timestamp\" desc limit 30;", "schema": "sientia_data", "table_name": "log_retrain", + "datetime_columns": ["timestamp"] } assert result == expected @@ -195,6 +197,7 @@ def test_predictions_batch(mock_process_path_priority, } ], "path_priority": ["STOP", "CONTINUE", "REPEAT"], + "datetime_columns": ["timestamp"] } result = predictions_batch(config) @@ -268,7 +271,8 @@ def test_predictions_batch(mock_process_path_priority, "config": {} } }, - "path_priority": ["STOP", "CONTINUE", "REPEAT"] + "path_priority": ["STOP", "CONTINUE", "REPEAT"], + "datetime_columns": ["timestamp"] } assert result == expected