def _remove_everything(self): Gallery.discard_cache() self.menu.destroy() self.game_board.destroy() self.status_bar.destroy() try: self.ship.destroy() except AttributeError: pass
def test_discard_cache(self): Gallery._pictures = {"alma": "a", "barack": "b", "citrom": "c"} Gallery.discard_cache() self.assertDictEqual({}, Gallery._pictures)