In Call overridden base class method without triggering the base class decorator I am able to skip a decoration, but in reality I have class methods that looks like
class MyClass:
@patch(foo)
@setup_test(bar)
def test_something()
do stuff
In order to call the original function, I need to call super().test_something.__wrapped__.__wrapped__(self)
which is ugly. I could write something like
def orig(f):
while hasattr(f, '__wrapped__'):
f = f.__wrapped__
return f
orig(super().test_something)(self)
What is a better way than this?