1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2025-02-23 06:31:58 +00:00

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

View file

@ -1063,8 +1063,9 @@ def test_fuse_allow_damaged_files(self):
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()