Skip to content

Commit

Permalink
Skip more incompatible tests on case-insenstive filesystems
Browse files Browse the repository at this point in the history
  • Loading branch information
lxp committed Jul 31, 2021
1 parent 97c8ca2 commit 0c325f4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,16 @@ def test_nocase_findfile(self):
def test_nocase_findfile_parent(self):
cache = FileInfoCache()
self.mkfile(os.path.join('aaaA', 'aaA1'), '1')
fs_case_sensitive = not os.path.exists('aAaA')
self.mkfile(os.path.join('aAaA', 'aaa2'), '2')

if not fs_case_sensitive:
print('Skipping some tests due to case-insensitive filesystem')

# right now we don't handle this case, though it would be possible
# to generate all possible matches and see if the number is exactly
# one.
with self.assertRaises(IOError) as cm:
cache.nocase_findfile(self.mkpath(os.path.join('aaAA', 'aaa2')))
self.assertEquals(errno.EEXIST, cm.exception.errno)
if fs_case_sensitive:
with self.assertRaises(IOError) as cm:
cache.nocase_findfile(self.mkpath(os.path.join('aaAA', 'aaa2')))
self.assertEquals(errno.EEXIST, cm.exception.errno)

0 comments on commit 0c325f4

Please sign in to comment.