#NEWLINE# def test_all( ) : #NEWLINE# #INDENT# specs = glob . glob ( 'tests/data/*.spec' ) #NEWLINE# for ( idx , spec ) in enumerate ( specs ) : #NEWLINE# #INDENT# sys . stderr . write ( ( '%2d %s\n' % ( idx , spec ) ) ) #NEWLINE# args = load_commented_json ( spec ) #NEWLINE# expected = open ( spec . replace ( '.spec' , '.out.json' ) ) . read ( ) . decode ( 'utf8' ) #NEWLINE# actual = jss . run ( args ) #NEWLINE# if ( expected != actual ) : #NEWLINE# #INDENT# open ( '/tmp/expected.json' , 'w' ) . write ( expected . encode ( 'utf8' ) ) #NEWLINE# open ( '/tmp/actual.json' , 'w' ) . write ( actual . encode ( 'utf8' ) ) #NEWLINE# #UNINDENT# eq_ ( expected , actual )