Closed bensenberner closed 3 years ago
Thanks for raising, it looks like the testbook decorator needs to preserve the function signature or something in pytest has changed recently. @rohitsanj think you'll have a little time to look into it?
Thanks for raising this issue. This is certainly a high priority bug. I think this is happening due to #68, where pytest sees the test function as a fixture. Meanwhile, I could release a patch that fixes this issue by just removing the fixture
call.
Hey @fcollonval, unfortunately wrapping decorator as a pytest fixture causes the test to not be picked up by pytest, which silently slipped by through our CI. Any ideas on how we can fix this? ๐
Hey sorry to miss that. I pushed a fix that works this time.
With a
test.py
that looks likerunning
pytest test.py
yieldsOnly the non-testbook test is picked up, even though they both are prefixed with
test
.On the other hand, when I use a context manager in
test.py
:then both the tests are picked up.