Skip to content

Commit

Permalink
add PY3.4 support + more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
un33k committed Oct 17, 2014
1 parent 8913ad5 commit 6e1793f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- pypy
install:
- pip install -q -r requirements.txt --use-mirrors
before_script:
- if [[ $TRAVIS_PYTHON_VERSION == '3.2' ]]; then 2to3 --no-diffs --write --nobackups slugify; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.3' ]]; then 2to3 --no-diffs --write --nobackups slugify; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.4' ]]; then 2to3 --no-diffs --write --nobackups slugify; fi
script: python test.py
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 0.1.0

Enhancement:

- Added more test
- Added test for python 3.4

## 0.0.9

Enhancement:
Expand Down
2 changes: 1 addition & 1 deletion slugify/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-

__version__ = '0.0.9'
__version__ = '0.1.0'

from slugify import *
8 changes: 8 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,13 @@ def test_manager(self):
r = slugify(txt, max_length=20, word_boundary=True, separator="ZZZZZZ")
self.assertEqual(r, "jajaZZZZZZlolZZZZZZmememeooZZZZZZa")

txt = "___This is a test ---"
r = slugify(txt)
self.assertEqual(r, "this-is-a-test")

txt = "___This is a test___"
r = slugify(txt)
self.assertEqual(r, "this-is-a-test")

if __name__ == '__main__':
unittest.main()

0 comments on commit 6e1793f

Please sign in to comment.