From: l-m-h@web.de Date: Thu, 7 Dec 2017 11:40:51 +0000 (+0100) Subject: test: Add test to unset config items with the python bindings X-Git-Tag: 0.26_rc0~15 X-Git-Url: https://git.notmuchmail.org/git?a=commitdiff_plain;h=660f1a5a3373f098f6df8912ef6b62fa2b08d8f0;p=notmuch test: Add test to unset config items with the python bindings --- diff --git a/test/T390-python.sh b/test/T390-python.sh index c6f395e4..312d61e8 100755 --- a/test/T390-python.sh +++ b/test/T390-python.sh @@ -142,4 +142,17 @@ cat <<'EOF' >EXPECTED EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "set_config with no value will unset config entries" +test_python <<'EOF' +import notmuch +db = notmuch.Database(mode=notmuch.Database.MODE.READ_WRITE) +db.set_config('testkey1', '') +db.set_config('testkey2', '') +db.set_config("zzzafter", '') +db.set_config("aaabefore", '') +v = db.get_configs() +print(list(v) == []) +EOF +test_expect_equal "$(cat OUTPUT)" "True" + test_done