I'm creating an interface Mixins that contains methods that will throw error if it is not implemented, however it only happens during run time when the method is called, i would like to have python check if method is implemented before run time.
class TestInterface():
def get_testing_name(self):
raise NotImplementedError
def do_something(self):
return self.get_testing_name()
class Testing(TestInterface):
def __init__(self):
super().do_something()
In my Testing class, i didn't defined get_testing_name method, hence it will raise NotImplementedError. However this will only happen on run time
How do i make sure python check if method is not implemented before run time?