@@ -88,12 +88,15 @@ def test_excepthook_traceback(caplog):
caplog.set_level(logging.DEBUG)
with pytest.raises(SystemExit) as exc_check:
cliutil.ExceptHook()(*args)
assert caplog.records
assert caplog.records[-1].message == ''.join(traceback.format_exception(*args))
def test_is_main_script():
assert not cliutil.is_main_script()
@pytest.mark.parametrize('arg,expected', [
('debug', logging.DEBUG),
('info', logging.INFO),
('warning', logging.WARNING),
('warn', logging.WARNING),
('error', logging.ERROR),