[PATCH 2/2] python test "compare message ids"

2012-01-08 Thread Sebastian Spaeth
On Mon,  2 Jan 2012 14:51:27 +, Patrick Totzke  wrote:
> Introduces a second (trivial) test for the python
> bindings that searches for message ids and compares
> the output with that of `notmuch search`.

Test passes, so it went in.
-- next part --
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: 



Re: [PATCH 2/2] python test compare message ids

2012-01-08 Thread Sebastian Spaeth
On Mon,  2 Jan 2012 14:51:27 +, Patrick Totzke 
patricktot...@googlemail.com wrote:
 Introduces a second (trivial) test for the python
 bindings that searches for message ids and compares
 the output with that of `notmuch search`.

Test passes, so it went in.


pgpOPxhSYny4e.pgp
Description: PGP signature
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] python test compare message ids

2012-01-03 Thread Patrick Totzke
Introduces a second (trivial) test for the python
bindings that searches for message ids and compares
the output with that of `notmuch search`.
---
 test/python |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/test/python b/test/python
index c318cc1..6018c2d 100755
--- a/test/python
+++ b/test/python
@@ -15,4 +15,17 @@ for t in q_new.search_threads():
 EOF
 notmuch search --sort=oldest-first --output=threads tag:inbox | sed 
s/^thread://  EXPECTED
 test_expect_equal_file OUTPUT EXPECTED
+
+test_begin_subtest compare message ids
+test_python EOF
+import notmuch
+db = notmuch.Database(mode=notmuch.Database.MODE.READ_ONLY)
+q_new = notmuch.Query(db, 'tag:inbox')
+q_new.set_sort(notmuch.Query.SORT.OLDEST_FIRST)
+for m in q_new.search_messages():
+print m.get_message_id()
+EOF
+notmuch search --sort=oldest-first --output=messages tag:inbox | sed s/^id:// 
 EXPECTED
+test_expect_equal_file OUTPUT EXPECTED
+
 test_done
-- 
1.7.5.4

___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


[PATCH 2/2] python test "compare message ids"

2012-01-02 Thread Patrick Totzke
Introduces a second (trivial) test for the python
bindings that searches for message ids and compares
the output with that of `notmuch search`.
---
 test/python |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/test/python b/test/python
index c318cc1..6018c2d 100755
--- a/test/python
+++ b/test/python
@@ -15,4 +15,17 @@ for t in q_new.search_threads():
 EOF
 notmuch search --sort=oldest-first --output=threads tag:inbox | sed 
s/^thread:// > EXPECTED
 test_expect_equal_file OUTPUT EXPECTED
+
+test_begin_subtest "compare message ids"
+test_python < EXPECTED
+test_expect_equal_file OUTPUT EXPECTED
+
 test_done
-- 
1.7.5.4