fix: Make String Cleaner More Robust (#6032)

This commit is contained in:
Michael Genson
2025-08-27 09:19:43 -05:00
committed by GitHub
parent 1f724856b1
commit 42eef17cfb
2 changed files with 38 additions and 4 deletions

View File

@@ -62,6 +62,36 @@ clean_string_test_cases = (
input=1,
expected="1",
),
CleanerCase(
test_id="float",
input=1.5,
expected="1.5",
),
CleanerCase(
test_id="none",
input=None,
expected="",
),
CleanerCase(
test_id="list empty",
input=[],
expected="",
),
CleanerCase(
test_id="list none",
input=[None],
expected="",
),
CleanerCase(
test_id="list multiple none",
input=[None, None],
expected="",
),
CleanerCase(
test_id="unexpected type",
input={"key": "value"},
expected="{'key': 'value'}",
),
)