Commits

Vinay Sajip  committed 144e62a

Fixed int/long bug: Now all tests pass on 2.7 and 3.2, except for multipool which is skipped on 3.2 for now.

  • Participants
  • Parent commits f5c1a0a

Comments (0)

Files changed (2)

File src/whoosh/fields.py

     
     def _tiers(self, num):
         t = self.type
-        if t is int:
+        if t is int and not PY3:
             bitlen = 32
         else:
             bitlen = 64

File tests/test_fields.py

     ix = st.create_index(schema)
     
     w = ix.writer()
-    if PY3:
-        w.add_document(id=u("%s-%s") % (5, 23),
-                       date=datetime(2010, 5, 23, 14, 00, 00))
-    else:
-        for month in xrange(1, 12):
-            for day in xrange(1, 28):
-                w.add_document(id=u("%s-%s") % (month, day),
-                               date=datetime(2010, month, day, 14, 00, 00))
+    for month in xrange(1, 12):
+        for day in xrange(1, 28):
+            w.add_document(id=u("%s-%s") % (month, day),
+                           date=datetime(2010, month, day, 14, 00, 00))
     w.commit()
 
     with ix.searcher() as s:
         qp = qparser.QueryParser("id", schema)
         
-        #import pdb; pdb.set_trace()
         r = s.search(qp.parse("date:20100523"))
         assert_equal(len(r), 1)
         assert_equal(r[0]["id"], "5-23")