From d2456b08d342fcdc85ba4d9a1a2c06b671bc650e Mon Sep 17 00:00:00 2001 From: harshavardhan konepalli Date: Sat, 14 Feb 2026 18:55:56 +0530 Subject: [PATCH] Add edge case tests for empty input in clean_string - Test empty string input returns empty list - Test whitespace-only input returns empty list - Improves coverage of textcode.strings.clean_string function Signed-off-by: Harsha Reddy Signed-off-by: harshavardhan konepalli --- tests/textcode/test_strings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/textcode/test_strings.py b/tests/textcode/test_strings.py index e174249e99d..119f26ee14d 100644 --- a/tests/textcode/test_strings.py +++ b/tests/textcode/test_strings.py @@ -47,6 +47,10 @@ def test_clean_string(self): assert list(strings.clean_string('abababa')) assert not list(strings.clean_string(' tt\nf ')) assert list(strings.clean_string(' tt\nfb ')) + # Edge cases: empty and whitespace-only inputs + assert not list(strings.clean_string('')) + assert not list(strings.clean_string(' ')) + assert not list(strings.clean_string('\t\n ')) def test_strings_in_file(self): expected = [