From e813a223a5f8d026b975fa1fe6933fb4bfdf1595 Mon Sep 17 00:00:00 2001 From: Rubel Date: Wed, 29 Nov 2023 21:18:09 +0100 Subject: [PATCH] adding test for tranform_to_intended_data. --- tests/dataconverter/test_helpers.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/dataconverter/test_helpers.py b/tests/dataconverter/test_helpers.py index cd097bb29..fa4e13e40 100644 --- a/tests/dataconverter/test_helpers.py +++ b/tests/dataconverter/test_helpers.py @@ -79,6 +79,7 @@ def listify_template(data_dict: Template): listified_template[optionality][path] = [data_dict[optionality][path]] return listified_template + @pytest.mark.parametrize("input_data, expected_output", [ ('2.4E-23', 2.4e-23), ('28', 28), @@ -89,6 +90,7 @@ def listify_template(data_dict: Template): (None, None), ]) def test_transform_to_intended_dt(input_data, expected_output): + """Transform to possible numerical method.""" result = helpers.transform_to_intended_dt(input_data) # Use pytest.approx for comparing floating-point numbers