fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
33 lines
872 B
Python
33 lines
872 B
Python
import pytest
|
|
|
|
from pandas.compat._optional import VERSIONS
|
|
|
|
import pandas as pd
|
|
from pandas.core.computation import expr
|
|
from pandas.core.computation.engines import ENGINES
|
|
from pandas.util.version import Version
|
|
|
|
|
|
def test_compat():
|
|
# test we have compat with our version of numexpr
|
|
|
|
from pandas.core.computation.check import NUMEXPR_INSTALLED
|
|
|
|
ne = pytest.importorskip("numexpr")
|
|
|
|
ver = ne.__version__
|
|
if Version(ver) < Version(VERSIONS["numexpr"]):
|
|
assert not NUMEXPR_INSTALLED
|
|
else:
|
|
assert NUMEXPR_INSTALLED
|
|
|
|
|
|
@pytest.mark.parametrize("engine", ENGINES)
|
|
@pytest.mark.parametrize("parser", expr.PARSERS)
|
|
def test_invalid_numexpr_version(engine, parser):
|
|
if engine == "numexpr":
|
|
pytest.importorskip("numexpr")
|
|
a, b = 1, 2 # noqa: F841
|
|
res = pd.eval("a + b", engine=engine, parser=parser)
|
|
assert res == 3
|