Open rievva-aleksandra opened 2 years ago
Those already exist. See https://waffle.readthedocs.io/en/stable/testing/automated.html#testing-automated.
right now if you try to write this like this
@override_switch("some_switch", active=True)
class TestFoo:
...
it fails with TypeError: Can only decorate subclasses of unittest.TestCase
. on the latest 2.6.0 version, sorry for not making it clear right away.
You’re welcome to submit a pull request adding a pytest decorator.
It would be very useful if testing utils such as
override_switch
andoverride_flag
were available for pytest style classes as class decorators. Is this feature somewhere on the road map?