From 71d614644ba407290506144107d3444af20a7d2d Mon Sep 17 00:00:00 2001 From: JustinUrassa Date: Sat, 14 Feb 2026 11:54:30 +0300 Subject: [PATCH] test: add edge case test for whitespace-only input --- test.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test.py b/test.py index fcec4b6..8e1d755 100644 --- a/test.py +++ b/test.py @@ -239,6 +239,11 @@ def test_replacements_german_umlaut_custom(self): def test_pre_translation(self): self.assertEqual(PRE_TRANSLATIONS, [('Ю', 'U'), ('Щ', 'Sch'), ('У', 'Y'), ('Х', 'H'), ('Я', 'Ya'), ('Ё', 'E'), ('ё', 'e'), ('я', 'ya'), ('х', 'h'), ('у', 'y'), ('щ', 'sch'), ('ю', 'u'), ('Ü', 'Ue'), ('Ö', 'Oe'), ('Ä', 'Ae'), ('ä', 'ae'), ('ö', 'oe'), ('ü', 'ue'), ('Ϋ́', 'Y'), ('Ϋ', 'Y'), ('Ύ', 'Y'), ('Υ', 'Y'), ('Χ', 'Ch'), ('χ', 'ch'), ('Ξ', 'X'), ('ϒ', 'Y'), ('υ', 'y'), ('ύ', 'y'), ('ϋ', 'y'), ('ΰ', 'y')]) + + def test_slugify_only_whitespace(self): + txt = " " + r = slugify(txt) + self.assertEqual(r, "") class TestSlugifyUnicode(unittest.TestCase):