Skip to content

Commit

Permalink
fix unittests for windows
Browse files Browse the repository at this point in the history
hard-coded "/" directory separator
  • Loading branch information
christian-intra2net committed Dec 22, 2023
1 parent a96432f commit 7d9396c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tests/ftguess/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def test_encoding(self):
"""Check whether text file encoding is detected correctly"""
n_matches = 0
for filename, file_contents in loop_over_files(subdir='basic'):
match = re.match(r'basic/test-sample-(ascii|latin1|utf[816_lbe]+)(?:-nobom|-withbom)?.txt', filename)
match = re.match(r'basic.test-sample-(ascii|latin1|utf[816_lbe]+)(?:-nobom|-withbom)?.txt', filename)
if not match:
continue
n_matches += 1
Expand Down
2 changes: 1 addition & 1 deletion tests/oleid/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def test_macros(self):
self.assertEqual(value_dict['vba'], 'Yes',
"Unexpected value '{0}' for test sample {1}'"
.format(value_dict['xlm'], filename))
elif filename.startswith('basic/test-sample-'): # not clear what macro detection should do with text files
elif filename.startswith(join('basic', 'test-sample-')): # not clear what macro detection should do with text files
self.assertIn(value_dict['vba'], ('Yes', 'Error'),
"Unexpected value '{0}' for test sample {1}'"
.format(value_dict['vba'], filename))
Expand Down

0 comments on commit 7d9396c

Please sign in to comment.