def test_mro_fail(self): class MyMenu(object): pass my_menu = MyMenu() with pytest.raises(MenusError): check_mro(my_menu)
def test_mro(self): class MyMenu(BaseMenu): def __init__(self, *args, **kwargs): super(MyMenu, self).__init__(*args, **kwargs) my_menu = MyMenu() assert check_mro(my_menu) is True