From 5c766dd99d5675f70b34cfabc3a8b8556a0065f1 Mon Sep 17 00:00:00 2001 From: sme Date: Thu, 26 Apr 2018 05:20:35 +0200 Subject: Support for case sensitivity (#54) * added support for case sensitivity * remove empty line * ignore W605 warning from pycodestyle * doc string for lowercase keyword argument --- test.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test.py') diff --git a/test.py b/test.py index 3d37a0b..9ff9ec0 100644 --- a/test.py +++ b/test.py @@ -113,6 +113,11 @@ class TestSlugification(unittest.TestCase): r = slugify(txt, stopwords=['stopword']) self.assertEqual(r, 'this-has-a') + def test_stopword_removal_casesensitive(self): + txt = 'thIs Has a stopword Stopword' + r = slugify(txt, stopwords=['Stopword'], lowercase=False) + self.assertEqual(r, 'thIs-Has-a-stopword') + def test_multiple_stopword_occurances(self): txt = 'the quick brown fox jumps over the lazy dog' r = slugify(txt, stopwords=['the']) -- cgit v1.2.1