test_fuse_allow_damaged_files: assert exact error code

This commit is contained in:
Marian Beermann 2016-07-10 17:25:38 +02:00
parent 5a952ec6df
commit 1c7bdcdf9c
1 changed files with 2 additions and 1 deletions

View File

@ -1063,8 +1063,9 @@ class ArchiverTestCase(ArchiverTestCaseBase):
mountpoint = os.path.join(self.tmpdir, 'mountpoint')
with self.fuse_mount(self.repository_location + '::archive', mountpoint):
with pytest.raises(OSError):
with pytest.raises(OSError) as excinfo:
open(os.path.join(mountpoint, path))
assert excinfo.value.errno == errno.EIO
with self.fuse_mount(self.repository_location + '::archive', mountpoint, 'allow_damaged_files'):
open(os.path.join(mountpoint, path)).close()