#NEWLINE# def test_lens_makers_formula( ) : #NEWLINE# #INDENT# ( n1 , n2 ) = symbols ( 'n1, n2' ) #NEWLINE# m1 = Medium ( 'm1' , permittivity = e0 , n = 1 ) #NEWLINE# m2 = Medium ( 'm2' , permittivity = e0 , n = 1.33 ) #NEWLINE# assert ( lens_makers_formula ( n1 , n2 , 10 , ( - 10 ) ) == ( ( 5 * n2 ) / ( n1 - n2 ) ) ) #NEWLINE# assert ( round ( lens_makers_formula ( m1 , m2 , 10 , ( - 10 ) ) , 2 ) == ( - 20.15 ) ) #NEWLINE# assert ( round ( lens_makers_formula ( 1.33 , 1 , 10 , ( - 10 ) ) , 2 ) == 15.15 )