#NEWLINE# def test_pprog( ) : #NEWLINE# #INDENT# ' reading/writing of pulse program' #NEWLINE# dic = ng . bruker . read_pprog ( os . path . join ( DATA_DIR , 'bruker_3d' , 'pulseprogram' ) ) #NEWLINE# assert ( dic [ 'var' ] [ 'LOOPC' ] == '58' ) #NEWLINE# assert ( len ( dic [ 'incr' ] ) == 4 ) #NEWLINE# tf = tempfile . mktemp ( dir = '.' ) #NEWLINE# ng . bruker . write_pprog ( dic , dic ) #NEWLINE# ndic = ng . bruker . read_pprog ( tf ) #NEWLINE# assert dic_similar ( dic , ndic ) #NEWLINE# os . remove ( tf )