mirror of
https://github.com/simon987/Simple-Incremental-Search-Tool.git
synced 2025-12-13 15:19:05 +00:00
Added Media, Picture and Text file parsers
This commit is contained in:
15
spec/TextFileParser_spec.py
Normal file
15
spec/TextFileParser_spec.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from unittest import TestCase
|
||||
from parsing import TextFileParser
|
||||
|
||||
|
||||
class TextFileParserTest(TestCase):
|
||||
|
||||
def test_parse_csv(self):
|
||||
|
||||
parser = TextFileParser([], 12345)
|
||||
|
||||
info = parser.parse("test_files/text.csv")
|
||||
|
||||
self.assertTrue(info["content"].startswith("rosbagTimestamp,header,seq,stamp,secs,nsecs,"))
|
||||
self.assertEqual(len(info["content"]), 12345)
|
||||
self.assertEqual(info["encoding"], "ascii")
|
||||
Reference in New Issue
Block a user