test: add test that ensures return value of chroot.run()

Small followup for https://github.com/osbuild/osbuild/pull/1854
which added the return value to `util.Chroot.run`. This commit
now adds a (super trivial) test for this.
This commit is contained in:
Michael Vogt 2024-09-11 09:46:41 +02:00 committed by Simon de Vlieger
parent 6953ea89b4
commit ed95178b80

View file

@ -22,7 +22,8 @@ class RunReturn:
def test_chroot_context(mocked_run, tmp_path):
with Chroot(os.fspath(tmp_path)) as chroot:
chroot.run(["/bin/true"], check=True)
ret = chroot.run(["/bin/true"], check=True)
assert isinstance(ret, RunReturn)
chroot.run(["/bin/false"], check=False)
assert mocked_run.call_args_list == [