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):
267
267
)
268
268
out = '\n ' .join (lines )
269
269
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
-
275
270
if out .count (':' ) > len (lines ):
276
271
# : only one per line (except the last one which contains END).
277
272
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