Skip to content

Commit

Permalink
adding test for tranform_to_intended_data.
Browse files Browse the repository at this point in the history
  • Loading branch information
RubelMozumder committed Nov 29, 2023
1 parent 3c394d6 commit e813a22
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/dataconverter/test_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand All @@ -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
Expand Down

0 comments on commit e813a22

Please sign in to comment.