

def test_store_restore_empty_game(self):
    store = NamedTemporaryFile(delete=False)
    store.close()
    g1 = Game(scores_file=None, store_file=store.name)
    store.assertTrue(g1.store())
    g2 = Game(scores_file=None, store_file=store.name)
    g2.board.setCell(0, 0, 16)
    self.assertTrue(g2.restore())
    self.assertIn(g2.board.getCell(0, 0), [0, 2, 4])
    remove(store.name)

dataset/ETHPy150Open bfontaine/term2048/tests/test_game.py TestGame.test_store_restore_empty_game/VarMisuse@40/49 `self`->`store`