def test_removeSprite(self): tile_engine = TileEngine(eventmanager, gamedata) sprite = [(0,0), "b", "image", {}] tile_engine.images = {"image": 0} tile_engine.gtk = gtk tile_engine.loadSprites([sprite]) s = tile_engine._sprites[0] tile_engine.removeSprite(s) assert_equal(0, len(tile_engine._sprites))
def test_removeSpriteInvalid(self): tile_engine = TileEngine(eventmanager, gamedata) sprite = [(0,0), "b", "image", {}] tile_engine.loadSprites([]) tile_engine.removeSprite(sprite) assert_equal(0, len(tile_engine._sprites))