1. pombredanne
  2. whoosh

Commits

Matt Chaput  committed aa0bf62

Fixed a test that I don't know how it got broken.

  • Participants
  • Parent commits 9b19563
  • Branches default

Comments (0)

Files changed (1)

File tests/test_collector.py

View file
 
     schema = fields.Schema(id=fields.KEYWORD(stored=True),
                            body=fields.TEXT,
-                           num=fields.NUMERIC(stored=True,unique=True),
+                           num=fields.NUMERIC(stored=True, unique=True),
                            created=fields.DATETIME(stored=True))
     ix = RamStorage().create_index(schema)
 
         r = s.search(q, terms=True)
 
         assert r.has_matched_terms()
-        assert (r[0].matched_terms()
-                == [("created", b("(\x00\x00\x00\x00\x00\x80\xe1\xa2"))])
+        termlist = r[0].matched_terms()
+        assert len(termlist) == 1
+        pair = termlist[0]
+        assert pair[0] == "created"
+        assert pair[1] == b("(\x00\x00\x00\x00\x00\x80\xe1\xa3")