diff options
| author | sme <s-m-e@users.noreply.github.com> | 2018-04-26 05:20:35 +0200 |
|---|---|---|
| committer | Val Neekman <un33kvu@gmail.com> | 2018-04-25 23:20:35 -0400 |
| commit | 5c766dd99d5675f70b34cfabc3a8b8556a0065f1 (patch) | |
| tree | e75950d1ddbf986b175590ff587dfee5d5bf7f3b /test.py | |
| parent | 4c1a344652dfef32f786a96d94b351f4277da964 (diff) | |
| download | python-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.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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']) |
