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 @@ -267,11 +267,6 @@ def _write_header(fileobj, header):
267267 )
268268 out = '\n ' .join (lines )
269269
270- # Check the header is well formatted.
271- if out .count ('\n ' ) > len (lines ) - 1 : # \n only allowed between lines.
272- msg = f"Key-value pairs cannot contain '\\ n':\n { out } "
273- raise HeaderError (msg )
274-
275270 if out .count (':' ) > len (lines ):
276271 # : only one per line (except the last one which contains END).
277272 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