diff --git a/test.py b/test.py index 0cf3f0f..73dde3a 100644 --- a/test.py +++ b/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):