From 58767c68dc50070a00766e02f1fe46352758a4d6 Mon Sep 17 00:00:00 2001 From: "martin.holmer@gmail.com" Date: Sun, 5 Jan 2025 11:26:06 -0500 Subject: [PATCH] Add test of json_to_dict utility function --- taxcalc/tests/test_utils.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/taxcalc/tests/test_utils.py b/taxcalc/tests/test_utils.py index e9cc0a595..4659f6ed3 100644 --- a/taxcalc/tests/test_utils.py +++ b/taxcalc/tests/test_utils.py @@ -31,7 +31,8 @@ read_egg_csv, read_egg_json, delete_file, bootstrap_se_ci, certainty_equivalent, - ce_aftertax_expanded_income + ce_aftertax_expanded_income, + json_to_dict ) @@ -815,3 +816,9 @@ def test_table_columns_labels(): # check that length of two lists are the same assert len(DIST_TABLE_COLUMNS) == len(DIST_TABLE_LABELS) assert len(DIFF_TABLE_COLUMNS) == len(DIFF_TABLE_LABELS) + + +def test_invalid_json_to_dict(): + """Test docstring""" + with pytest.raises(ValueError): + json_to_dict('invalid_json_text')