I am working on a kind of test framework that happens to have classes named TestSomething of course. And I realized my tests are failing because pytest sees these classes as "something I need to instantiate and run!", as soon as imported. And this absolutely won't work.
import pytest
from package import TestSomethingClass
Is it possible to import such class from a pytest test file directly? Or should I indirectly use those via a fixture maybe?
The same problem applies to exceptions, as I would need to do something like
with pytest.raises(TestsSomethingError):