News for hackers. Stuff that matters.
Re:Pytest Tips and Tricks by Timon3 on Wednesday March 22, 2023 @01:06PM (#35264018)
I just ran into the fixture problem myself, maybe you can help me understand how I could find this myself.

I wanted to integrate pytest-benchmark[1]. Their docs mention fixtures a couple of times, but the examples only show that test functions receive a magic untyped parameter called "benchmark".

How would I make my usage more explicit? Can I somehow explicitly import the fixture, or at least type it?

[1] https://pytest-benchmark.readthedocs.io/en/latest/index.html

Re:Pytest Tips and Tricks by progval on Wednesday March 22, 2023 @04:44PM (#35266818)
I don't think you can do better than make pytest-benchmark a dependency