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:
parent
5a952ec6df
commit
1c7bdcdf9c
1 changed files with 2 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue