-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refs #31 -- basic slugification test structure
- Loading branch information
Showing
9 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
.tox/ | ||
build/ | ||
|
||
# py.test related | ||
.cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
py-gfm | ||
PyYAML | ||
shell | ||
cached-property |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
pytest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from ..toolbox import slugify |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
from markdown.extensions.headerid import slugify |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from .. import slugify | ||
|
||
|
||
def test_slugify_english(): | ||
assert slugify('hello', '-') == 'hello' | ||
assert slugify('hello world', '-') == 'hello-world' | ||
|
||
|
||
def test_slugify_french(): | ||
assert slugify("De quoi s'agit-il ?", '-') == 'de-quoi-sagit-il' | ||
|
||
|
||
def test_slugify_castellano(): | ||
assert slugify("¿Qué es esto?", '-') == 'que-es-esto' | ||
|
||
|
||
def test_slugify_converting_saves(): | ||
assert slugify('Converting Saves', '-') == 'converting-saves' | ||
assert slugify('Conversion des jets de sauvegarde', '-') == 'conversion-des-jets-de-sauvegarde' # noqa | ||
assert slugify('Convirtiendo tiradas de salvación', '-') == 'convirtiendo-tiradas-de-salvacion' # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
[tox] | ||
envlist = build | ||
envlist = build,test | ||
skipsdist = True | ||
|
||
[testenv] | ||
basepython = python3.4 | ||
deps = | ||
py-gfm | ||
PyYAML | ||
shell | ||
cached-property | ||
-rbuild-requirements.pip | ||
# For debuggin purposes | ||
ipdb | ||
# ipdb | ||
commands = | ||
python build.py | ||
|
||
|
||
[testenv:test] | ||
basepython = python3.4 | ||
deps = | ||
-rbuild-requirements.pip | ||
-rtest-requirements.pip | ||
commands = | ||
py.test toolbox |