Skip to content

Commit f03c3a4

Browse files
committed
Update tests for file with spaces #310
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent a757fb0 commit f03c3a4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tests/test_util.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -187,9 +187,9 @@ def test_invalid_chars_in_file_name(self):
187187
expected = ['%', '!', '(', ')', '$', '$', ':']
188188
assert expected == result
189189

190-
def test_invalid_chars_with_space(self):
190+
def test_invalid_chars_with_space_is_valid(self):
191191
result = util.invalid_chars('_ Hello')
192-
expected = [' ']
192+
expected = []
193193
assert expected == result
194194

195195
def test_check_file_names_with_dupes_return_errors(self):
@@ -223,10 +223,11 @@ def test_check_file_names_with_invalid_chars_return_errors(self):
223223
'locations/file',
224224
'locations/file with space',
225225
'locations/dir1/dir2/file1',
226-
'locations/dir2/file1'
226+
'locations/dir2/file1',
227+
'Accessibilité/ périmètre'
227228
]
228229

229-
expected = [Error(CRITICAL, "Invalid characters ' ' in file name at: 'locations/file with space'")]
230+
expected = [Error(CRITICAL, "Invalid characters 'éè' in file name at: 'Accessibilité/ périmètre'")]
230231
result = util.check_file_names(paths)
231232

232233
assert expected[0].message == result[0].message

0 commit comments

Comments
 (0)