Skip to content

Commit

Permalink
Actually test C implementation. (#47)
Browse files Browse the repository at this point in the history
The tests for the C implementation tests set `PURE_PYTHON` to the string `'0'`
which evaluates to `True` so the C implementation was not tested at all,
but the Python one was tested twice.
  • Loading branch information
icemac committed Jan 26, 2024
1 parent d0cbe86 commit d2d75aa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/zope/index/text/okapiindex.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@

_py_impl = getattr(platform, 'python_implementation', lambda: None)
_is_pypy = _py_impl() == 'PyPy'
PURE_PYTHON = os.environ.get('PURE_PYTHON') or _is_pypy
PURE_PYTHON = int(os.environ.get('PURE_PYTHON', '0')) or _is_pypy
try:
from zope.index.text.okascore import score
except ImportError: # pragma: no cover
Expand Down

0 comments on commit d2d75aa

Please sign in to comment.