Commits

Matt Chaput  committed daf551d

Added test for the behavior of writer(procs=0).

  • Participants
  • Parent commits f47fcc3

Comments (0)

Files changed (1)

File tests/test_writing.py

 
     with ix.writer() as w:
         w.add_document(**doc)
+
+
+def test_zero_procs():
+    schema = fields.Schema(text=fields.TEXT)
+    ix = RamStorage().create_index(schema)
+    with ix.writer(procs=0) as w:
+        assert isinstance(w, writing.IndexWriter)
+
+    with ix.writer(procs=1) as w:
+        assert isinstance(w, writing.IndexWriter)