[Python] How to access the test_info in my conftest.py

Discussão em 'Python' iniciado por Stack, Agosto 15, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to access the test_info inbuilt fixture in my custom fixture, and I can't even see the fixture listing there. If I try to use by just providing the parameters, getting fixture [test_info] not found.

    Then, I thought maybe pytest is not considering methods inside my conftest.py as tests, and might be why not giving the fixture there. So, tried to check in one of my test method under testdir, and getting the same result.

    Saw this https://stackoverflow.com/a/75325863/806687 for JS but no sure how to get this globals for python or if this approach would work.

    Continue reading...

Compartilhe esta Página