コード例 #1
0
def test_level_parser_save_load():
    level = Parser(state_sizes=[2, 3])
    parser = LevelParser(levels=3, parsers=[level, Parser()])
    saved = parser.save()
    loaded = Parser.load(saved)
    assert parser == loaded
コード例 #2
0
 def test_save_load(self):
     level = Parser(state_sizes=[2, 3])
     parser = LevelParser(levels=3, parsers=[level, Parser()])
     saved = parser.save()
     loaded = Parser.load(saved)
     self.assertEqual(parser, loaded)