예제 #1
0
 def testLines(self):
     """DOC"""
     lines = lncore.text_to_lines(basic_text)
     specs = TokenizingTest.results
     for (line, spec) in zip(lines, specs):
         (line_type, record_type, key, value) = spec
         assert line.line_type == line_type, line.line_type
         assert line.record_type == record_type
         assert line.key == key
         assert line.value == value, spec
예제 #2
0
 def setUp(self):
     """Create a namespace to test from the basic text."""
     lines = lncore.text_to_lines(basic_text)
     self.namespace = lncore.lines_to_namespace(lines)