Skip to content

Commit eb68ff0

Browse files
Add test
1 parent 1ca5f85 commit eb68ff0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

spec/test_parsers_spec.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,15 @@
173173
result_f5d = line['orig']
174174
assert result_f5d == expected_f5d
175175
break
176+
with it('F5D(REE) parser detects and stores file format errors'):
177+
with CchFile('spec/curve_files/F5D_0238_0762_20211008.1') as cch_file:
178+
for line in cch_file:
179+
expected_f5d = 'ES0237000000130940CT0F;2021/06/01 01:00;1;189;;;;;;0;0;TA/202100018520;\r\n'
180+
result_f5d = line['orig']
181+
assert result_f5d == expected_f5d
182+
expected_errors = [('source', [u'Field may not be null.'])]
183+
assert cch_file.errors == expected_errors
184+
break
176185

177186
with it('test to get MHCIL parser'):
178187
for filename in self.mhcil_filenames:

0 commit comments

Comments
 (0)