From 6e1793fcda103bc1cae7f96295c56574be7880cc Mon Sep 17 00:00:00 2001 From: Val Neekman Date: Thu, 16 Oct 2014 21:22:45 -0400 Subject: add PY3.4 support + more tests --- .travis.yml | 2 ++ CHANGELOG.md | 7 +++++++ slugify/__init__.py | 2 +- test.py | 8 ++++++++ 4 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1566bd5..d51b361 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index d4800d8..b2bd1af 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## 0.1.0 + +Enhancement: + + - Added more test + - Added test for python 3.4 + ## 0.0.9 Enhancement: diff --git a/slugify/__init__.py b/slugify/__init__.py index 097b6aa..a0b2249 100644 --- a/slugify/__init__.py +++ b/slugify/__init__.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -__version__ = '0.0.9' +__version__ = '0.1.0' from slugify import * diff --git a/test.py b/test.py index bf51653..a66b263 100644 --- a/test.py +++ b/test.py @@ -68,5 +68,13 @@ class TestSequenceFunctions(unittest.TestCase): 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() -- cgit v1.2.1