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 failing with "fixture 'prom' not found" #9

Open
johanneskastl opened this issue Oct 26, 2023 · 1 comment
Open

Tests failing with "fixture 'prom' not found" #9

johanneskastl opened this issue Oct 26, 2023 · 1 comment

Comments

@johanneskastl
Copy link

I am trying to package this for openSUSE, but the tests are failing with a missing fixture.

I have found no hint on which test dependencies I might be missing. I found no requirements.txt or similar, only some runtime dependencies inside the pyproject.toml.

Is this documented somewhere? If not, could this be documented?

Thanks!

[   12s] ============================= test session starts ==============================
[   12s] platform linux -- Python 3.9.18, pytest-7.4.2, pluggy-1.0.0 -- /usr/bin/python3.9
[   12s] cachedir: .pytest_cache
[   12s] rootdir: /home/abuild/rpmbuild/BUILD/prometrix-ca3e889c11b51ec5dcb0e7a47dae6e724be96e7e
[   12s] plugins: lazy-fixture-0.6.3
[   13s] collecting ... collected 1 item
[   13s] 
[   13s] tests/main.py::test_label ERROR                                          [100%]
[   13s] 
[   13s] ==================================== ERRORS ====================================
[   13s] _________________________ ERROR at setup of test_label _________________________
[   13s] file /home/abuild/rpmbuild/BUILD/prometrix-ca3e889c11b51ec5dcb0e7a47dae6e724be96e7e/tests/main.py, line 28
[   13s]   def test_label(prom: CustomPrometheusConnect) -> bool:
[   13s] E       fixture 'prom' not found
[   13s] >       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
[   13s] >       use 'pytest --fixtures [testpath]' for help on them.
[   13s] 
[   13s] /home/abuild/rpmbuild/BUILD/prometrix-ca3e889c11b51ec5dcb0e7a47dae6e724be96e7e/tests/main.py:28
[   13s] =========================== short test summary info ============================
[   13s] ERROR tests/main.py::test_label
[   13s] =============================== 1 error in 0.61s ===============================
@fabaff
Copy link

fabaff commented May 17, 2024

Same issue with 0.1.18 with Python 3.12 on NixOS.

============================= test session starts ==============================
platform linux -- Python 3.12.3, pytest-8.1.1, pluggy-1.4.0
rootdir: /build/source
configfile: pyproject.toml
collected 1 item                                                               

tests/main.py E                                                          [100%]

==================================== ERRORS ====================================
_________________________ ERROR at setup of test_label _________________________
file /build/source/tests/main.py, line 28
  def test_label(prom: CustomPrometheusConnect) -> bool:
E       fixture 'prom' not found
>       available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
>       use 'pytest --fixtures [testpath]' for help on them.

/build/source/tests/main.py:28
=========================== short test summary info ============================
ERROR tests/main.py::test_label

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