Closed Bwallker closed 2 years ago
The class I am using inherits from unittest.TestCase
unittest.TestCase does not support pytest fixtures out of the box. You have to do a bit of work to get them to work. This isn't a dpytest issue. https://docs.pytest.org/en/6.2.x/unittest.html
thanks for the answer @Sillocan !
I'll close the issue, I think.
Is your feature request related to a problem? Please describe.
I would like to put my tests into classes, but if I do they don't work
with this setup my test runs as you would expect and fails because of an exception I throw. this is supposed to happen.
However when I put my test and fixture into a class it no longer works Having the fixture outside the class and the test inside the class doesn't work either
Describe the solution you'd like
If this is a limitation or a bug in dpytest, I would like it fixed. If it is something I am doing wrong, I would like to know how I can get it to work
Describe alternatives you've considered
Not putting my tests into classes. But I think this is messy and I prefer having them in classes :/
Additional context