예제 #1
0
 def test_parse_line_duplicate_key(self):
     """ Override value if label already exists in same line. """
     line = "hoge:foo\tbar:baz\ttime:20:30:58\thoge:bar\n"
     ret = parse_line(line)
     self.assertEqual(ret['hoge'], 'bar')
     self.assertEqual(ret['bar'], 'baz')
     self.assertEqual(ret['time'], '20:30:58')
예제 #2
0
 def test_parse_line(self):
     """ parse_file() should parse lstv line to dict."""
     line = "hoge:foo\tbar:baz\ttime:20:30:58\n"
     ret = parse_line(line)
     self.assertEqual(ret['hoge'], 'foo')
     self.assertEqual(ret['bar'], 'baz')
     self.assertEqual(ret['time'], '20:30:58')