Exemple #1
0
 def populate(self, source):
     LOGGER.info("Parsing string '%s'." % source)
     try:
         TxtReader().read(BytesIO(source.encode("utf-8")), self)
     except Exception:
         raise DataError(get_error_message())
 def test_split_row_with_pipe(self):
     raw_text = "| col0 | col1   | col2"
     expected = ["col0", "col1", "col2"]
     assert_equal(TxtReader.split_row(raw_text), expected)
     assert_equal(TxtReader().split_row(raw_text), expected)
Exemple #3
0
 def populate(self, content):
     TxtReader().read(content, self)