unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: David Bremner <david@tethera.net>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: [PATCH] test: add known broken tests for python bindings in split configs
Date: Mon, 25 Oct 2021 23:11:31 -0300	[thread overview]
Message-ID: <20211026021131.3162922-1-david@tethera.net> (raw)
In-Reply-To: <87cznswnuu.fsf@tethera.net>

This reproduces the bug(s) reported in id:87h7d4wp6b.fsf@tethera.net
---
 test/T055-path-config.sh | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh
index ef22e964..c06962e4 100755
--- a/test/T055-path-config.sh
+++ b/test/T055-path-config.sh
@@ -308,6 +308,34 @@ EOF
 	   test_expect_equal "${output}+${output2}" "${value}+"
 	   ;;
    esac
+
+   case $config in
+       split|XDG*)
+	   test_begin_subtest "'to' header does not crash (python) ($config)"
+	   test_subtest_known_broken
+	   echo 'notmuch@notmuchmail.org' > EXPECTED
+	   test_python <<EOF
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+m=db.find_message('20091117232137.GA7669@griffis1.net')
+to=m.get_header('to')
+print(to)
+EOF
+	   test_expect_equal_file EXPECTED OUTPUT
+
+	   test_begin_subtest "'to' header does not crash (python-cffi) ($config)"
+	   test_subtest_known_broken
+	   echo 'notmuch@notmuchmail.org' > EXPECTED
+	   test_python <<EOF
+import notmuch2
+db=notmuch2.Database()
+m=db.find('20091117232137.GA7669@griffis1.net')
+to=m.header('To')
+print(to)
+EOF
+	   test_expect_equal_file EXPECTED OUTPUT
+	   ;;
+   esac
    restore_config
    rm -rf home/.local
    rm -rf home/.config
-- 
2.33.0

  reply	other threads:[~2021-10-26  2:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-26  1:27 problem with message headers in python bindings David Bremner
2021-10-26  1:56 ` David Bremner
2021-10-26  2:11   ` David Bremner [this message]
2021-10-27  2:36     ` WIP fix split-config for notmuch-python2 David Bremner
2021-10-27  2:36       ` [PATCH 1/2] WIP: add python-cffi bindings to path David Bremner
2021-10-27  2:36       ` [PATCH 2/2] WIP/python2: switch to notmuch_database_{open,create}_with_config David Bremner
2021-12-05 12:35 ` problem with message headers in python bindings David Bremner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211026021131.3162922-1-david@tethera.net \
    --to=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).