[Python-checkins] python/dist/src/Lib/test test_math.py,1.13,1.14

rhettinger@sourceforge.net rhettinger@sourceforge.net
Sun, 12 May 2002 20:55:03 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv5200

Modified Files:
	test_math.py 
Log Message:
Adds tests for degrees() and radians() functions added to mathmodule.  
Closes patch 552452 and feature request 426539.


Index: test_math.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** test_math.py	5 Sep 2001 22:36:56 -0000	1.13
--- test_math.py	13 May 2002 03:55:01 -0000	1.14
***************
*** 58,61 ****
--- 58,66 ----
  testit('cosh(2)-2*cosh(1)**2', math.cosh(2)-2*math.cosh(1)**2, -1) # Thanks to Lambert
  
+ print 'degrees'
+ testit('degrees(pi)', math.degrees(math.pi), 180.0)
+ testit('degrees(pi/2)', math.degrees(math.pi/2), 90.0)
+ testit('degrees(-pi/4)', math.degrees(-math.pi/4), -45.0)
+ 
  print 'exp'
  testit('exp(-1)', math.exp(-1), 1/math.e)
***************
*** 129,132 ****
--- 134,142 ----
  testit('pow(2,1)', math.pow(2,1), 2)
  testit('pow(2,-1)', math.pow(2,-1), 0.5)
+ 
+ print 'radians'
+ testit('radians(180)', math.radians(180), math.pi)
+ testit('radians(90)', math.radians(90), math.pi/2)
+ testit('radians(-45)', math.radians(-45), -math.pi/4)     
  
  print 'sin'