コード例 #1
0
def test_parser_save_load(test):
    parser = Parser(*test)
    saved = parser.save()
    loaded = Parser.load(saved)
    assert parser == loaded
コード例 #2
0
 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)