#NEWLINE# def test_lens_formula( ) : #NEWLINE# #INDENT# ( u , v , f ) = symbols ( 'u, v, f' ) #NEWLINE# assert ( lens_formula ( focal_length = f , u = u ) == ( ( f * u ) / ( f + u ) ) ) #NEWLINE# assert ( lens_formula ( focal_length = f , v = v ) == ( ( f * v ) / ( f - v ) ) ) #NEWLINE# assert ( lens_formula ( u = u , v = v ) == ( ( v * v ) / ( u - v ) ) ) #NEWLINE# assert ( lens_formula ( u = oo , v = v ) == v ) #NEWLINE# assert ( lens_formula ( u = oo , v = oo ) == oo )