Commits

Matt Chaput committed 5551675

Forgot to commit test for Nones in compound queries.

  • Participants
  • Parent commits 18b93df

Comments (0)

Files changed (1)

tests/test_queries.py

 from __future__ import with_statement
 import copy
 
+import pytest
+
 from whoosh import fields, qparser, query
 from whoosh.compat import b, u
 from whoosh.filedb.filestore import RamStorage
         r2 = [hit["id"] for hit in s.search(q2, sortedby="id")]
 
         assert r1 == r2 == [4]
+
+
+def test_none_in_compounds():
+    with pytest.raises(query.QueryError):
+        _ = query.And([query.Term("a", "b"), None, query.Term("c", "d")])
+