summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVal Neekman <val@neekware.com>2012-10-14 19:21:46 -0700
committerVal Neekman <val@neekware.com>2012-10-14 19:21:46 -0700
commit19587b7674691f059c5058fdbb858284afea0e4b (patch)
tree0dbab9f02e9fa19c6cc6face5e9c21205170cb3a
parentcce2c8edd87a9ac130c1e41b06959e77f71042ba (diff)
downloadpython-slugify-0.0.2.tar.gz
added more test cases0.0.2
-rw-r--r--README.md8
-rw-r--r--slugify/__init__.py2
-rw-r--r--test.py14
3 files changed, 18 insertions, 6 deletions
diff --git a/README.md b/README.md
index 26155a5..eb1f5a4 100644
--- a/README.md
+++ b/README.md
@@ -43,6 +43,10 @@ How to use
r = slugify(s)
print r # => "ying-shi-ma"
+ txt = 'Компьютер'
+ r = slugify(txt)
+ print r # => "kompiuter"
+
Running the tests
=================
@@ -54,6 +58,10 @@ To run the tests against the current environment:
Changelog
=========
+0.0.2
+-----
+* Added more tests
+
0.0.1
-----
diff --git a/slugify/__init__.py b/slugify/__init__.py
index 94d0bc1..fe634bf 100644
--- a/slugify/__init__.py
+++ b/slugify/__init__.py
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-
-__version__ = '0.0.1'
+__version__ = '0.0.2'
__all__ = ['slugify']
diff --git a/test.py b/test.py
index d713ee3..e0697b5 100644
--- a/test.py
+++ b/test.py
@@ -5,12 +5,16 @@ from slugify import slugify
class TestSequenceFunctions(unittest.TestCase):
- def test_space_dash(self):
+ def test_manager(self):
+
txt = "This is a test ---"
r = slugify(txt)
self.assertEquals(r, "this-is-a-test")
-
- def test_special_chars(self):
+
+ txt = "This -- is a ## test ---"
+ r = slugify(txt)
+ self.assertEquals(r, "this-is-a-test")
+
txt = 'C\'est déjà l\'été.'
r = slugify(txt)
self.assertEquals(r, "cest-deja-lete")
@@ -19,9 +23,9 @@ class TestSequenceFunctions(unittest.TestCase):
r = slugify(txt)
self.assertEquals(r, "nin-hao-wo-shi-zhong-guo-ren")
- txt = '影師嗎'
+ txt = 'Компьютер'
r = slugify(txt)
- self.assertEquals(r, "ying-shi-ma")
+ self.assertEquals(r, "kompiuter")
if __name__ == '__main__':
unittest.main()