File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -441,12 +441,16 @@ def test_newline(self):
441441 a = np .array ([(1 , 2 ), (3 , 4 )])
442442 c = BytesIO ()
443443
444- # Native
444+ # Universal newline, implicit and explicit
445445 newline = os .linesep .encode ()
446+ np .savetxt (c , a , fmt = '%d' )
447+ c .seek (0 )
448+ assert_equal (c .readlines (), [b'1 2' + newline , b'3 4' + newline ],
449+ err_msg = 'Universal newline, implicit' )
446450 np .savetxt (c , a , fmt = '%d' , newline = None )
447451 c .seek (0 )
448452 assert_equal (c .readlines (), [b'1 2' + newline , b'3 4' + newline ],
449- err_msg = 'Native newline' )
453+ err_msg = 'Universal newline, explicit ' )
450454
451455 # POSIX
452456 newline = b'\n '
@@ -508,7 +512,7 @@ def test_header_footer(self):
508512 c .seek (0 )
509513 assert_equal (c .read (),
510514 asbytes ('1 2\n 3 4\n ' + commentstr + test_header_footer + '\n ' ))
511-
515+
512516 def test_file_roundtrip (self ):
513517 with temppath () as name :
514518 a = np .array ([(1 , 2 ), (3 , 4 )])
You can’t perform that action at this time.
0 commit comments