def test_smart(self): game = Game(resolution=(100, 100)) game.autoscale = False game.working_directory = "/home/luke/Projects/pyvida/test_data" a = Actor("Adam") a.smart(game) assert list(a.actions.keys()) == ["idle"] assert a.resource_name == "Adam"
def test_load_assets(self): game = Game(resolution=(100, 100)) game.autoscale = False game.working_directory = "/home/luke/Projects/pyvida/test_data" a = Actor("Adam") a.smart(game) a.load_assets(game) resource = get_resource(a.resource_name) action = a.get_action() assert resource[0] == 249 assert resource[1] == 341 assert action.w == 249 assert action.h == 341 assert type(resource[2]) == PyvidaSprite assert list(a.actions.keys()) == ["idle"]