Skip to content

Commit 40b2190

Browse files
committed
Test code fixes
1 parent 500006f commit 40b2190

File tree

2 files changed

+5
-19
lines changed

2 files changed

+5
-19
lines changed

about.ABOUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ about_resource: .
22
name: AboutCode-toolkit
33
about_resource_path: .
44

5-
version: 3.0.0.dev6
5+
version: 3.3.3
66

77
description: |
88
AboutCode Toolkit is a tool to process ABOUT files. An ABOUT file

tests/test_util.py

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -177,14 +177,14 @@ def test_invalid_chars_with_invalid_in_name_and_dir(self):
177177
assert expected == result
178178

179179
def test_invalid_chars_in_file_name(self):
180-
name = '%657!1351()275612$_$asafg:'
180+
name = '%657!1351()275612$_$asaf>g:<'
181181
result = util.invalid_chars(name)
182-
expected = ['%', '!', '(', ')', '$', '$', ':']
182+
expected = [u'%', u'!', u'$', u'$', u'>', u':', u'<']
183183
assert expected == result
184184

185-
def test_invalid_chars_with_space(self):
185+
def test_valid_chars_with_space(self):
186186
result = util.invalid_chars('_ Hello')
187-
expected = [' ']
187+
expected = []
188188
assert expected == result
189189

190190
def test_check_file_names_with_dupes_return_errors(self):
@@ -213,20 +213,6 @@ def test_check_file_names_with_no_invalid_char_return_no_error(self):
213213
result = util.check_file_names(paths)
214214
assert expected == result
215215

216-
def test_check_file_names_with_invalid_chars_return_errors(self):
217-
paths = [
218-
'locations/file',
219-
'locations/file with space',
220-
'locations/dir1/dir2/file1',
221-
'locations/dir2/file1'
222-
]
223-
224-
expected = [Error(CRITICAL, "Invalid characters ' ' in file name at: 'locations/file with space'")]
225-
result = util.check_file_names(paths)
226-
227-
assert expected[0].message == result[0].message
228-
assert expected == result
229-
230216
def test_get_about_locations(self):
231217
location = get_test_loc('parse/complete')
232218
result = list(util.get_about_locations(location))

0 commit comments

Comments
 (0)