Matt Chaput committed 6dd85af

Removed debug prints.

  • Participants
  • Parent commits 357c255

Comments (0)

Files changed (3)

File src/whoosh/filedb/

         for name in sorted(self.fieldnames):
             con = self._con(name)
-            #t = now()
-            #con.execute("create index postix on postings (token, docnum)")
-            #print "Create index:", name, now() - t
-            print "Reading", name
-            t = now()
             for text, docnum, weight, valuestring in con.execute("select * from postings order by token, docnum"):
                 yield (name, text, docnum, weight, valuestring)
-            print "Readback:", name, now() - t
         if self._using_tempdir and self.dir:

File tests/

             w.add_document(ev=u("a"), **doc)
-def try_sort(sortedby, key, q=None, limit=None, reverse=False, debug=False):
+def try_sort(sortedby, key, q=None, limit=None, reverse=False):
     if q is None: q = query.Term("ev", u("a"))
     correct = [d["id"] for d in sorted(docs, key=key, reverse=reverse)][:limit]
             with ix.searcher() as s:
                 r =, sortedby=sortedby, limit=limit, reverse=reverse)
                 rids = [d["id"] for d in r]
-                if debug:
-                    print "fn=", fn
-                    print "rids=", rids
-                    print "correct=", correct
                 assert_equal(rids, correct)
         r =, groupedby=facet)
         # If you specify a facet withou a name, it's automatically called
         # "facet"
-        print r.groups("facet")
         assert_equal(r.groups("facet"), {"a-c": [1, 2, 4],
                                          "d-f": [5, 7, 8],
                                          "g-i": [0, 3, 6]})
     with ix.searcher() as s:
         q = query.And([query.Term("text", u("alfa")), query.Term("text", u("bravo"))])
         results =, sortedby=fnfacet)
-        print results.top_n
         r = [hit["text"] for hit in results]
         for t in r[:10]:
             tks = t.split()

File tests/

     add_spelling(ix, ["text1", "text2"])
     with ix.reader() as r:
-        print r.dawg
         assert r.has_word_graph("text1")
         assert r.has_word_graph("text2")
     with ix.reader() as r:
         assert r.is_atomic()
         assert_equal(list(r.lexicon("text")), sorted(domain))
-        print
         assert r.has_word_graph("text")
         words = list(dawg.flatten(r.word_graph("text")))
         assert_equal(words, sorted(domain))