Skip to content

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

Description

@johanneskastl

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

Activity

  1. fabaff commented on May 17, 2024

    @fabaff

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions