Skip to content

Commit

Permalink
feat: Allow user to specify a format for stdout. Test case fixes(#242)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yogesh Tewari committed Aug 5, 2021
1 parent fb76f44 commit e37a88a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tests/unit/result_handlers/test_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
4 changes: 4 additions & 0 deletions tests/unit/test_data_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
],
consts.CONFIG_THRESHOLD: 0.0,
consts.CONFIG_RESULT_HANDLER: None,
consts.CONFIG_FORMAT: "table",
}

SAMPLE_THRESHOLD_CONFIG = {
Expand Down Expand Up @@ -97,6 +98,7 @@
],
consts.CONFIG_THRESHOLD: 150.0,
consts.CONFIG_RESULT_HANDLER: None,
consts.CONFIG_FORMAT: "table",
}

SAMPLE_ROW_CONFIG = {
Expand Down Expand Up @@ -136,6 +138,7 @@
},
],
consts.CONFIG_RESULT_HANDLER: None,
consts.CONFIG_FORMAT: "table",
}

SAMPLE_ROW_CALC_CONFIG = {
Expand Down Expand Up @@ -223,6 +226,7 @@
},
],
consts.CONFIG_RESULT_HANDLER: None,
consts.CONFIG_FORMAT: "table",
}


Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_schema_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
consts.CONFIG_AGGREGATES: [],
consts.CONFIG_THRESHOLD: 0.0,
consts.CONFIG_RESULT_HANDLER: None,
# consts.CONFIG_FORMAT: "table",
}

STRING_CONSTANT = "constant"
Expand Down

0 comments on commit e37a88a

Please sign in to comment.