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:
1
coverage.sh
Executable file
1
coverage.sh
Executable file
@@ -0,0 +1 @@
|
|||||||
|
pytest --cov=laborious --cov-report=html && xdg-open htmlcov/index.html
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user