#NEWLINE# def test_sort_with_diff( tmpfiles ) : #NEWLINE# #INDENT# filename = tmpfiles . join ( 'incorrect_1.py' ) . strpath #NEWLINE# main ( [ '--diff' , '--check-only' , filename ] ) #NEWLINE# stdout . seek ( 0 ) #NEWLINE# lines = stdout . read ( ) . splitlines ( ) #NEWLINE# lines = lines [ 4 : ] #NEWLINE# assert ( lines == [ '+import json' , ' import sys' , '-' , '-' , '-import json' ] )