SIENTIAPDE-1193

Enhance test cases by adding 'datetime_columns' to input data for MinimalRetrain and PredictionsBatch workflows. This improves metadata handling in asynchronous tests.
This commit is contained in:
vitor-aignosi
2025-08-25 09:11:52 -03:00
parent 9cdbc0afda
commit 8f8859aaa6
3 changed files with 5 additions and 1 deletions

1
coverage.sh Executable file
View File

@@ -0,0 +1 @@
pytest --cov=laborious --cov-report=html && xdg-open htmlcov/index.html

View File

@@ -48,6 +48,7 @@ async def test_run(workflow_mock: AsyncMock, minimal_retrain: MinimalRetrain):
{ {
**metadata, **metadata,
"query": input_data["query"], "query": input_data["query"],
'datetime_columns': input_data.get('datetime_columns', [])
}, },
retry_policy=ANY, retry_policy=ANY,
start_to_close_timeout=ANY start_to_close_timeout=ANY

View File

@@ -32,7 +32,8 @@ async def test_run(workflow_mock: AsyncMock, predictions_batch: PredictionsBatch
'query': 'SELECT * FROM test', 'query': 'SELECT * FROM test',
'schema': 'test_schema', 'schema': 'test_schema',
'table_name': 'test_table', 'table_name': 'test_table',
'opc_output_config': 'test_opc_output_config' 'opc_output_config': 'test_opc_output_config',
'datetime_columns': ['timestamp', 'created_at']
} }
await predictions_batch.run(input_data) await predictions_batch.run(input_data)
@@ -43,6 +44,7 @@ async def test_run(workflow_mock: AsyncMock, predictions_batch: PredictionsBatch
{ {
**metadata, **metadata,
'query': input_data['query'], 'query': input_data['query'],
'datetime_columns': input_data.get('datetime_columns', [])
}, },
retry_policy=ANY, retry_policy=ANY,
start_to_close_timeout=ANY start_to_close_timeout=ANY