On 18.03.22 21:36, John Snow wrote:
Modify this test to use assertRaises for its negative testing of
qemu_io. If the exception raised does not match the one we tell it to
expect, we get *that* exception unhandled. If we get no exception, we
get a unittest assertion failure and the provided emsg printed to
screen.
If we get the CalledProcessError exception but the output is not what we
expect, we re-raise the original CalledProcessError.
Tidy.
Signed-off-by: John Snow <js...@redhat.com>
---
.../qemu-iotests/tests/migration-permissions | 28 +++++++++----------
1 file changed, 14 insertions(+), 14 deletions(-)
Just like Eric I don’t find it so tidy that `ctx` exists outside of the
`with` block, but re-raising the exception is indeed better, so:
Reviewed-by: Hanna Reitz <hre...@redhat.com>