

def test_store_non_empty_file(self):
    store = NamedTemporaryFile(delete=False)
    store.close()
    g = Game(scores_file=None, store_file=store.name)
    self.assertTrue(g.store())
    self.assertFileIsNotEmpty(store.name)
    remove(store.name)

dataset/ETHPy150Open bfontaine/term2048/tests/test_game.py TestGame.test_store_non_empty_file/original