Skip to content

Commit 0c325f4

Browse files
committed
Skip more incompatible tests on case-insenstive filesystems
1 parent 97c8ca2 commit 0c325f4

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

test/test_caching.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,16 @@ def test_nocase_findfile(self):
163163
def test_nocase_findfile_parent(self):
164164
cache = FileInfoCache()
165165
self.mkfile(os.path.join('aaaA', 'aaA1'), '1')
166+
fs_case_sensitive = not os.path.exists('aAaA')
166167
self.mkfile(os.path.join('aAaA', 'aaa2'), '2')
167168

169+
if not fs_case_sensitive:
170+
print('Skipping some tests due to case-insensitive filesystem')
171+
168172
# right now we don't handle this case, though it would be possible
169173
# to generate all possible matches and see if the number is exactly
170174
# one.
171-
with self.assertRaises(IOError) as cm:
172-
cache.nocase_findfile(self.mkpath(os.path.join('aaAA', 'aaa2')))
173-
self.assertEquals(errno.EEXIST, cm.exception.errno)
175+
if fs_case_sensitive:
176+
with self.assertRaises(IOError) as cm:
177+
cache.nocase_findfile(self.mkpath(os.path.join('aaAA', 'aaa2')))
178+
self.assertEquals(errno.EEXIST, cm.exception.errno)

0 commit comments

Comments
 (0)