fix test failure: python3 + whoosh

This commit is contained in:
Takayuki Shimizukawa
2012-12-17 04:24:24 +00:00
parent 066c432152
commit 5e8d7b9c38
2 changed files with 3 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ class BaseSearch(object):
res = self.context_re.search(text)
if res is None:
return ''
context_start = max(res.start() - length/2, 0)
context_start = max(res.start() - int(length/2), 0)
context_end = context_start + length
context = ''.join([context_start > 0 and '...' or '',
text[context_start:context_end],

View File

@@ -4,6 +4,8 @@ envlist=py25,py26,py27,py31,py32,py33,pypy,du09,du08,du07
[testenv]
deps=
nose
sqlalchemy
whoosh
setenv =
BUILD_TEST_PATH = {envdir}/tests
commands=