Commits

Matt Chaput  committed 0e0d6b6

Fixed Python 3.x problem with merged pull request.

  • Participants
  • Parent commits 081dc13

Comments (0)

Files changed (1)

File tests/test_analysis.py

 import pytest
 
 from whoosh import analysis, fields, qparser
-from whoosh.compat import u, unichr
+from whoosh.compat import b, u, unichr
 from whoosh.compat import dumps
 from whoosh.filedb.filestore import RamStorage
 
                                            "/alfa/bravo/charlie",
                                            "/alfa/bravo/charlie/delta"]
 
+
 def test_path_tokenizer2():
     path_field = fields.TEXT(analyzer=analysis.PathTokenizer())
     st = RamStorage()
     with index.reader() as reader:
         items = list(reader.all_terms())
     assert 'path' in [field for field, value in items]
-    assert '/alfa' in [value for field, value in items]
+    assert b('/alfa') in [value for field, value in items]
+
 
 def test_composition1():
     ca = analysis.RegexTokenizer() | analysis.LowercaseFilter()