From 026428391cb20829787f26aa45de966eced72163 Mon Sep 17 00:00:00 2001 From: Michael Howitz Date: Thu, 25 Jan 2024 15:21:42 +0100 Subject: [PATCH] Actually test C implementation. 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. --- src/zope/index/text/okapiindex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zope/index/text/okapiindex.py b/src/zope/index/text/okapiindex.py index a79e51f..229cb55 100644 --- a/src/zope/index/text/okapiindex.py +++ b/src/zope/index/text/okapiindex.py @@ -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