File tree Expand file tree Collapse file tree 2 files changed +0
-9
lines changed Expand file tree Collapse file tree 2 files changed +0
-9
lines changed Original file line number Diff line number Diff line change @@ -266,11 +266,6 @@ def _write_header(fileobj, header):
266266 )
267267 out = '\n ' .join (lines )
268268
269- # Check the header is well formatted.
270- if out .count ('\n ' ) > len (lines ) - 1 : # \n only allowed between lines.
271- msg = f"Key-value pairs cannot contain '\\ n':\n { out } "
272- raise HeaderError (msg )
273-
274269 if out .count (':' ) > len (lines ):
275270 # : only one per line (except the last one which contains END).
276271 msg = f"Key-value pairs cannot contain ':':\n { out } "
Original file line number Diff line number Diff line change @@ -192,10 +192,6 @@ def test_write_simple_file(self):
192192 # TCK file containing not well formatted entries in its header.
193193 tck_file = BytesIO ()
194194 tck = TckFile (tractogram )
195- tck .header ['new_entry' ] = 'value\n ' # \n not allowed
196- with pytest .raises (HeaderError ):
197- tck .save (tck_file )
198-
199195 tck .header ['new_entry' ] = 'val:ue' # : not allowed
200196 with pytest .raises (HeaderError ):
201197 tck .save (tck_file )
You can’t perform that action at this time.
0 commit comments