Implement test for dirname normalised bug
This commit is contained in:
parent
716e198b4b
commit
8d78f38d99
13
test.py
13
test.py
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user