Implement test for dirname normalised bug

This commit is contained in:
Kristóf Tóth 2018-09-09 00:45:09 +02:00
parent 716e198b4b
commit 8d78f38d99
1 changed files with 11 additions and 2 deletions

13
test.py
View File

@ -1,4 +1,5 @@
from string import punctuation, whitespace
from os.path import dirname
import pytest
@ -36,8 +37,16 @@ def test_remove_accent_from_letters(normalise):
assert normalise('éáűöüóőú') == 'eauouoou'
def test_dirname_is_not_changed(normalise):
assert False
@pytest.mark.parametrize(
'path', [
'/home/user/Desktop/cica sajt',
'/Users/cat/big\tcheese',
'/etc/nginx/sites-enabled/cat.conf'
'/root/what/big celebration.txt'
]
)
def test_dirname_is_not_changed(normalise, path):
assert dirname(normalise(path)) == dirname(path)
def test_name_with_trailing_slash_is_normalised(normalise):