X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=bindings%2Fpython-cffi%2Ftests%2Ftest_database.py;h=55069b5e35df85bb0739a1a0d865302c6693af32;hb=2d895a0119b423b117d10e890c9e0eb5d2a9cdf8;hp=e3a8344d8cded01e3a0ee3895faaa9173a816745;hpb=131757907907380213b32934d9e73cec942ace43;p=notmuch diff --git a/bindings/python-cffi/tests/test_database.py b/bindings/python-cffi/tests/test_database.py index e3a8344d..55069b5e 100644 --- a/bindings/python-cffi/tests/test_database.py +++ b/bindings/python-cffi/tests/test_database.py @@ -324,3 +324,14 @@ class TestQuery: threads = db.threads('*') thread = next(threads) assert isinstance(thread, notmuch2.Thread) + + def test_use_threaded_message_twice(self, db): + thread = next(db.threads('*')) + for msg in thread.toplevel(): + assert isinstance(msg, notmuch2.Message) + assert msg.alive + del msg + for msg in thread: + assert isinstance(msg, notmuch2.Message) + assert msg.alive + del msg