#NEWLINE# def test_main( ) : #NEWLINE# #INDENT# inpath = 'samples/basic.py' #NEWLINE# outpath = 'samples/basic.xml' #NEWLINE# configs = read_config_file ( inpath ) #NEWLINE# assert ( len ( configs [ 'REMAPS' ] ) > 0 ) #NEWLINE# xml_str = gen_config ( configs ) #NEWLINE# with open ( outpath , 'r' ) as fp : #NEWLINE# #INDENT# util . assert_xml_equal ( fp . read ( ) , xml_str , ignore_tags = [ 'Easy-Karabiner' ] ) #NEWLINE# #UNINDENT# write_generated_xml ( outpath , xml_str ) #NEWLINE# newpath = backup_file ( outpath ) #NEWLINE# os . rename ( newpath , outpath ) #NEWLINE# args = [ inpath , outpath , '--verbose' , '--string' , '--no-reload' ] #NEWLINE# runner = CliRunner ( ) #NEWLINE# result = runner . invoke ( main , args ) #NEWLINE# assert ( result . exit_code == 0 )