mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-04-18 17:56:44 +00:00
16 lines
493 B
Python
16 lines
493 B
Python
from unittest import TestCase
|
|
from parsing import TextFileParser
|
|
|
|
|
|
class TextFileParserTest(TestCase):
|
|
|
|
def test_parse_csv(self):
|
|
|
|
parser = TextFileParser([], 1234, "test_files/")
|
|
|
|
info = parser.parse("test_files/text.csv")
|
|
|
|
self.assertTrue(info["content"].startswith("rosbagTimestamp,header,seq,stamp,secs,nsecs,"))
|
|
self.assertEqual(len(info["content"]), 1309) # Size is larger because of html escaping
|
|
self.assertEqual(info["encoding"], "ascii")
|