Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with unknown fixtures for the taball taken from https://pypi.org: fixture 'ford_2012' not found #663

Open
yurivict opened this issue Jul 13, 2024 · 5 comments

Comments

@yurivict
Copy link

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

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 13, 2024

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 ==============================

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 13, 2024

Seems like you aren't finding tests/conftest.py for some reason

@yurivict
Copy link
Author

Did you get the sources from the PYPI tarball?

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 13, 2024

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

@mrjbq7
Copy link
Collaborator

mrjbq7 commented Jul 13, 2024

Perhaps this will resolve it for future releases.

429bd96

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants