ta-lib-python
ta-lib-python copied to clipboard
Tests fail with unknown fixtures for the taball taken from https://pypi.org: fixture 'ford_2012' not found
Several tests fail:
_______________________________________________________________________________ ERROR at setup of test_BBANDS _______________________________________________________________________________
file /usr/ports/finance/py-ta-lib/work-py311/ta_lib-0.4.32/tests/test_func.py, line 112
def test_BBANDS(series):
E fixture 'series' not found
> available fixtures: _session_event_loop, benchmark, benchmark_weave, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, datadir, doctest_namespace, event_loop, event_loop_policy, mocker, module_mocker, monkeypatch, no_cover, original_datadir, package_mocker, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, shared_datadir, testrun_uid, tests/test_func.py::<event_loop>, time_machine, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, unused_tcp_port, unused_tcp_port_factory, unused_udp_port, unused_udp_port_factory, weave, worker_id
> use 'pytest --fixtures [testpath]' for help on them.
/usr/ports/finance/py-ta-lib/work-py311/ta_lib-0.4.32/tests/test_func.py:112
_______________________________________________________________________________ ERROR at setup of test_EMAEMA _______________________________________________________________________________
file /usr/ports/finance/py-ta-lib/work-py311/ta_lib-0.4.32/tests/test_func.py, line 140
def test_EMAEMA(series):
E fixture 'series' not found
> available fixtures: _session_event_loop, benchmark, benchmark_weave, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, datadir, doctest_namespace, event_loop, event_loop_policy, mocker, module_mocker, monkeypatch, no_cover, original_datadir, package_mocker, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, shared_datadir, testrun_uid, tests/test_func.py::<event_loop>, time_machine, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, unused_tcp_port, unused_tcp_port_factory, unused_udp_port, unused_udp_port_factory, weave, worker_id
> use 'pytest --fixtures [testpath]' for help on them.
/usr/ports/finance/py-ta-lib/work-py311/ta_lib-0.4.32/tests/test_func.py:140
________________________________________________________________________________ ERROR at setup of test_MIN _________________________________________________________________________________
file /usr/ports/finance/py-ta-lib/work-py311/ta_lib-0.4.32/tests/test_func.py, line 77
def test_MIN(series):
E fixture 'series' not found
> available fixtures: _session_event_loop, benchmark, benchmark_weave, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, datadir, doctest_namespace, event_loop, event_loop_policy, mocker, module_mocker, monkeypatch, no_cover, original_datadir, package_mocker, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, shared_datadir, testrun_uid, tests/test_func.py::<event_loop>, time_machine, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, unused_tcp_port, unused_tcp_port_factory, unused_udp_port, unused_udp_port_factory, weave, worker_id
> use 'pytest --fixtures [testpath]' for help on them.
/usr/ports/finance/py-ta-lib/work-py311/ta_lib-0.4.32/tests/test_func.py:77
____________________________________________________________________________ ERROR at setup of test_doji_candle _____________________________________________________________________________
file /usr/ports/finance/py-ta-lib/work-py311/ta_lib-0.4.32/tests/test_abstract.py, line 109
def test_doji_candle(ford_2012):
E fixture 'ford_2012' not found
> available fixtures: _session_event_loop, benchmark, benchmark_weave, cache, capfd, capfdbinary, caplog, capsys, capsysbinary, class_mocker, cov, datadir, doctest_namespace, event_loop, event_loop_policy, mocker, module_mocker, monkeypatch, no_cover, original_datadir, package_mocker, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, session_mocker, shared_datadir, testrun_uid, tests/test_abstract.py::<event_loop>, time_machine, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory, unused_tcp_port, unused_tcp_port_factory, unused_udp_port, unused_udp_port_factory, weave, worker_id
> use 'pytest --fixtures [testpath]' for help on them.
Version: 0.4.32
They work for me, what versions of things are you using?
$ LD_LIBRARY_PATH=/usr/local/lib:${LD_LIBRARY_PATH} pytest
============================= test session starts ==============================
platform darwin -- Python 3.11.9, pytest-8.2.2, pluggy-1.5.0
rootdir: /Users/jbenedik/Dev/ta-lib-python
configfile: pyproject.toml
plugins: anyio-4.4.0
collected 45 items
tests/test_abstract.py ................ [ 35%]
tests/test_func.py .................. [ 75%]
tests/test_pandas.py .. [ 80%]
tests/test_polars.py .... [ 88%]
tests/test_stream.py ..... [100%]
============================== 45 passed in 2.83s ==============================
Seems like you aren't finding tests/conftest.py for some reason
Did you get the sources from the PYPI tarball?
Hmm, it seems like tests/conftest.py might not be in the release file:
$ tar xvfz TA-Lib-0.4.32.tar.gz
x ta_lib-0.4.32/
x ta_lib-0.4.32/AUTHORS
x ta_lib-0.4.32/COPYRIGHT
x ta_lib-0.4.32/LICENSE
x ta_lib-0.4.32/MANIFEST.in
x ta_lib-0.4.32/PKG-INFO
x ta_lib-0.4.32/README.md
x ta_lib-0.4.32/TA_Lib.egg-info/
x ta_lib-0.4.32/TA_Lib.egg-info/PKG-INFO
x ta_lib-0.4.32/TA_Lib.egg-info/SOURCES.txt
x ta_lib-0.4.32/TA_Lib.egg-info/dependency_links.txt
x ta_lib-0.4.32/TA_Lib.egg-info/requires.txt
x ta_lib-0.4.32/TA_Lib.egg-info/top_level.txt
x ta_lib-0.4.32/pyproject.toml
x ta_lib-0.4.32/setup.cfg
x ta_lib-0.4.32/setup.py
x ta_lib-0.4.32/talib/
x ta_lib-0.4.32/talib/__init__.py
x ta_lib-0.4.32/talib/_abstract.pxi
x ta_lib-0.4.32/talib/_common.pxi
x ta_lib-0.4.32/talib/_func.pxi
x ta_lib-0.4.32/talib/_stream.pxi
x ta_lib-0.4.32/talib/_ta_lib.c
x ta_lib-0.4.32/talib/_ta_lib.pxd
x ta_lib-0.4.32/talib/_ta_lib.pyx
x ta_lib-0.4.32/talib/abstract.py
x ta_lib-0.4.32/talib/common.pxd
x ta_lib-0.4.32/talib/deprecated.py
x ta_lib-0.4.32/talib/stream.py
x ta_lib-0.4.32/tests/
x ta_lib-0.4.32/tests/test_abstract.py
x ta_lib-0.4.32/tests/test_func.py
x ta_lib-0.4.32/tests/test_pandas.py
x ta_lib-0.4.32/tests/test_polars.py
x ta_lib-0.4.32/tests/test_stream.py
Perhaps this will resolve it for future releases.
429bd9665b716365b3b70e955805557e49f840de
This should be fixed in the 0.4.33 release, and also the 0.5.0 release.