I have an class:
class Klass:
pass
and an outside method:
def foo():
return "foo method"
How to pass the test:
assert Klass().foo() == "foo method"
with decorator for foo
method?
edited: without changes in Klass
I have an class:
class Klass:
pass
and an outside method:
def foo():
return "foo method"
How to pass the test:
assert Klass().foo() == "foo method"
with decorator for foo
method?
edited: without changes in Klass
Copyright © 2021 Jogjafile Inc.
I'm not sure I understand what would you like to get by saying
decorator
but how about this?If this is not what are you looking for, please try to find some better words.