X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython-cffi%2Ftests%2Ftest_errors.py;fp=bindings%2Fpython-cffi%2Ftests%2Ftest_errors.py;h=c2519f86108ab3d810d3e5b456480c41657024ee;hp=0000000000000000000000000000000000000000;hb=ca4e1d885b0d9dcdeb45ad6f2829f88dafc7949c;hpb=d7f95724132bf658fd151630185899737e2ed829 diff --git a/bindings/python-cffi/tests/test_errors.py b/bindings/python-cffi/tests/test_errors.py new file mode 100644 index 00000000..c2519f86 --- /dev/null +++ b/bindings/python-cffi/tests/test_errors.py @@ -0,0 +1,8 @@ +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'