[Python] How to create a pytest fixture for a decorated function?

Discussão em 'Python' iniciado por Stack, Dezembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    For my pytest suite, I would like to create fixtures to reduce duplicate code. I read this SO answer but that seems like a lot of boiler plate code.

    I would like to create a fixture from the segment like the code below:

    @my_decorator
    def func() -> None:
    pass

    Continue reading...

Compartilhe esta Página