#NEWLINE# def test_issue_5615( ) : #NEWLINE# #INDENT# ( aA , Re , a , b , D ) = symbols ( 'aA Re a b D' ) #NEWLINE# e = ( ( ( ( D ** 3 ) * a ) + ( b * ( aA ** 3 ) ) ) / Re ) . expand ( ) #NEWLINE# assert ( collect ( e , [ ( ( aA ** 3 ) / Re ) , a ] ) == e )