notmuch/bindings/python-cffi/tests/test_errors.py
David Bremner 126347b694 Import notmuch_0.38.2.orig.tar.xz
[dgit import orig notmuch_0.38.2.orig.tar.xz]
2023-12-01 07:51:09 -04:00

8 lines
330 B
Python

from notmuch2 import _capi as capi
from notmuch2 import _errors as errors
def test_status_no_message():
exc = errors.NotmuchError(capi.lib.NOTMUCH_STATUS_PATH_ERROR)
assert exc.status == capi.lib.NOTMUCH_STATUS_PATH_ERROR
assert exc.message is None
assert str(exc) == 'Path supplied is illegal for this function'