summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorsme <s-m-e@users.noreply.github.com>2018-04-26 05:20:35 +0200
committerVal Neekman <un33kvu@gmail.com>2018-04-25 23:20:35 -0400
commit5c766dd99d5675f70b34cfabc3a8b8556a0065f1 (patch)
treee75950d1ddbf986b175590ff587dfee5d5bf7f3b /test.py
parent4c1a344652dfef32f786a96d94b351f4277da964 (diff)
downloadpython-slugify-5c766dd99d5675f70b34cfabc3a8b8556a0065f1.tar.gz
Support for case sensitivity (#54)
* added support for case sensitivity * remove empty line * ignore W605 warning from pycodestyle * doc string for lowercase keyword argument
Diffstat (limited to 'test.py')
-rw-r--r--test.py5
1 files changed, 5 insertions, 0 deletions
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'])