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
def test_save_load(self): parser = Parser(state_sizes=[1, 2, 3], reset_on_sentence_end=False) saved = parser.save() loaded = Parser.load(saved) self.assertEqual(parser, loaded)
def test_parser_save_load(test): parser = Parser(*test) saved = parser.save() loaded = Parser.load(saved) assert parser == loaded
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)