def test_overrides_base_method(self): items = [] class Extension(object): @staticmethod def fail(): items.append('fail') expecter = expect.extend(Extension) expecter.fail() assert items == ['fail']
def test_right_most_extension_takes_precedence(self): items = [] class Extension(object): def some_method(self): items.append('method') @classmethod def some_classmethod(cls): items.append('classmethod') expecter = expect.extend(self.extension, Extension) expecter(None).some_method() expecter.some_classmethod() assert items == ['method', 'classmethod']