#NEWLINE# def test_latex_commutator( ) : #NEWLINE# #INDENT# A = Operator ( 'A' ) #NEWLINE# B = Operator ( 'B' ) #NEWLINE# comm = Commutator ( B , A ) #NEWLINE# assert ( latex ( comm . doit ( ) ) == '- (A B - B A)' )