increase coverage

This commit is contained in:
Gregory Becker 2023-03-29 16:10:07 -07:00
parent 2e96f86df2
commit b97107af54

View File

@ -3343,8 +3343,10 @@ def test_view_update_fails(update_method, tmpdir, install_mockery, mock_fetch, m
def raises(*args, **kwargs):
raise OSError
# The python symlink code fails by raising an error
monkeypatch.setattr(fs, "rename", raises)
monkeypatch.setattr(spack.util.atomic_update, "_renameat2", raises)
# The c library call fails by a non-zero return code
monkeypatch.setattr(spack.util.atomic_update, "_renameat2", lambda x, y, z, v, w: 1)
with pytest.raises(OSError):
view.regenerate([spec])