test/api: check api.exception exits the process
The `api.exception` method, which is internally also used by `api.exception_handler` helper, calls `sys.exit` and this no statement after a call to either method should be reached. Add an assertion to make sure of that.
This commit is contained in:
parent
78d72eded9
commit
17fbe41b03
1 changed files with 1 additions and 0 deletions
|
|
@ -89,6 +89,7 @@ class TestAPI(unittest.TestCase):
|
|||
def exception(path):
|
||||
with osbuild.api.exception_handler(path):
|
||||
raise ValueError("osbuild test exception")
|
||||
assert False, "api.exception should exit process"
|
||||
|
||||
api = osbuild.api.API(args, monitor, socket_address=path)
|
||||
with api:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue