From e37a88ab7d5d561eeec0e055ca9ae798c66ef554 Mon Sep 17 00:00:00 2001 From: Yogesh Tewari Date: Thu, 5 Aug 2021 15:15:54 -0400 Subject: [PATCH] feat: Allow user to specify a format for stdout. Test case fixes(#242) --- tests/unit/result_handlers/test_text.py | 2 +- tests/unit/test_data_validation.py | 4 ++++ tests/unit/test_schema_validation.py | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/unit/result_handlers/test_text.py b/tests/unit/result_handlers/test_text.py index 19741aa68..2a81fa42e 100644 --- a/tests/unit/result_handlers/test_text.py +++ b/tests/unit/result_handlers/test_text.py @@ -39,7 +39,7 @@ def test_import(module_under_test): def test_basic_result_handler(module_under_test): """Test basic handler executes """ result_df = DataFrame(SAMPLE_RESULT_DATA) - result_handler = module_under_test.TextResultHandler() + result_handler = module_under_test.TextResultHandler(format="table") handler_output = result_handler.execute(SAMPLE_CONFIG, result_df) assert handler_output["count"].sum() == result_df["count"].sum() diff --git a/tests/unit/test_data_validation.py b/tests/unit/test_data_validation.py index d2a79308f..1b3d3efe3 100644 --- a/tests/unit/test_data_validation.py +++ b/tests/unit/test_data_validation.py @@ -67,6 +67,7 @@ ], consts.CONFIG_THRESHOLD: 0.0, consts.CONFIG_RESULT_HANDLER: None, + consts.CONFIG_FORMAT: "table", } SAMPLE_THRESHOLD_CONFIG = { @@ -97,6 +98,7 @@ ], consts.CONFIG_THRESHOLD: 150.0, consts.CONFIG_RESULT_HANDLER: None, + consts.CONFIG_FORMAT: "table", } SAMPLE_ROW_CONFIG = { @@ -136,6 +138,7 @@ }, ], consts.CONFIG_RESULT_HANDLER: None, + consts.CONFIG_FORMAT: "table", } SAMPLE_ROW_CALC_CONFIG = { @@ -223,6 +226,7 @@ }, ], consts.CONFIG_RESULT_HANDLER: None, + consts.CONFIG_FORMAT: "table", } diff --git a/tests/unit/test_schema_validation.py b/tests/unit/test_schema_validation.py index da515798e..209c753c1 100644 --- a/tests/unit/test_schema_validation.py +++ b/tests/unit/test_schema_validation.py @@ -51,6 +51,7 @@ consts.CONFIG_AGGREGATES: [], consts.CONFIG_THRESHOLD: 0.0, consts.CONFIG_RESULT_HANDLER: None, + # consts.CONFIG_FORMAT: "table", } STRING_CONSTANT = "constant"