@@ -583,7 +583,7 @@ def test_fileWithFlakes(self):
583
583
fd .close ()
584
584
d = self .runPyflakes ([self .tempfilepath ])
585
585
expected = UnusedImport (self .tempfilepath , Node (1 ), 'contraband' )
586
- self .assertEqual (d , ("%s\n " % expected , '' , 1 ))
586
+ self .assertEqual (d , ("%s%s " % ( expected , os . linesep ) , '' , 1 ))
587
587
588
588
def test_errors (self ):
589
589
"""
@@ -592,7 +592,8 @@ def test_errors(self):
592
592
printed to stderr.
593
593
"""
594
594
d = self .runPyflakes ([self .tempfilepath ])
595
- error_msg = '%s: No such file or directory\n ' % (self .tempfilepath ,)
595
+ error_msg = '%s: No such file or directory%s' % (self .tempfilepath ,
596
+ os .linesep )
596
597
self .assertEqual (d , ('' , error_msg , 1 ))
597
598
598
599
def test_readFromStdin (self ):
@@ -601,4 +602,4 @@ def test_readFromStdin(self):
601
602
"""
602
603
d = self .runPyflakes ([], stdin = 'import contraband' .encode ('ascii' ))
603
604
expected = UnusedImport ('<stdin>' , Node (1 ), 'contraband' )
604
- self .assertEqual (d , ("%s\n " % expected , '' , 1 ))
605
+ self .assertEqual (d , ("%s%s " % ( expected , os . linesep ) , '' , 1 ))
0 commit comments