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):
266
266
)
267
267
out = '\n ' .join (lines )
268
268
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
-
274
269
if out .count (':' ) > len (lines ):
275
270
# : only one per line (except the last one which contains END).
276
271
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):
192
192
# TCK file containing not well formatted entries in its header.
193
193
tck_file = BytesIO ()
194
194
tck = TckFile (tractogram )
195
- tck .header ['new_entry' ] = 'value\n ' # \n not allowed
196
- with pytest .raises (HeaderError ):
197
- tck .save (tck_file )
198
-
199
195
tck .header ['new_entry' ] = 'val:ue' # : not allowed
200
196
with pytest .raises (HeaderError ):
201
197
tck .save (tck_file )
You can’t perform that action at this time.
0 commit comments