X-Git-Url: https://git.cworth.org/git?p=notmuch;a=blobdiff_plain;f=bindings%2Fpython-cffi%2Ftests%2Ftest_thread.py;h=619d2aacfaa255ebfa0a6e775d2bab2575c5c3a3;hp=afdbcfe071f721cc88e36b093bcc384aab291214;hb=63d3b2b5cf8702b5fecea77392ce46f8a8249175;hpb=51c287ead807b6e3830bc5d393a7e9a89f36db86 diff --git a/bindings/python-cffi/tests/test_thread.py b/bindings/python-cffi/tests/test_thread.py index afdbcfe0..619d2aac 100644 --- a/bindings/python-cffi/tests/test_thread.py +++ b/bindings/python-cffi/tests/test_thread.py @@ -57,6 +57,13 @@ def test_iter(thread): def test_matched(thread): assert thread.matched == 1 +def test_matched_iter(thread): + count = 0 + msgs = list(iter(thread)) + for msg in msgs: + if msg.matched: + count += 1 + assert count == thread.matched def test_authors_type(thread): assert isinstance(thread.authors, notmuch2.BinString)