]> git.notmuchmail.org Git - notmuch/blob - bindings/python-cffi/tests/test_errors.py
Fix error message when using notmuch_status_to_string
[notmuch] / bindings / python-cffi / tests / test_errors.py
1 from notmuch2 import _capi as capi
2 from notmuch2 import _errors as errors
3
4 def test_status_no_message():
5     exc = errors.NotmuchError(capi.lib.NOTMUCH_STATUS_PATH_ERROR)
6     assert exc.status == capi.lib.NOTMUCH_STATUS_PATH_ERROR
7     assert exc.message is None
8     assert str(exc) == 'Path supplied is illegal for this function'