[Python-checkins] CVS: python/dist/src/Lib/test test_math.py,1.11,1.12

Tim Peters tim_one@users.sourceforge.net
Wed, 11 Apr 2001 17:24:43 -0700


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

Modified Files:
	test_math.py 
Log Message:
Reverting the "unixware7" patch:  atan2(0, 1) should be 0, regardless of
platform.  If it returns pi on the unixware7 platform, they have a bug in
their libm atan2.


Index: test_math.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_math.py,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -r1.11 -r1.12
*** test_math.py	2001/04/11 20:58:20	1.11
--- test_math.py	2001/04/12 00:24:41	1.12
***************
*** 2,6 ****
  # XXXX Should not do tests around zero only
  
- import sys
  from test_support import *
  
--- 2,5 ----
***************
*** 37,44 ****
  testit('atan2(-1, 0)', math.atan2(-1, 0), -math.pi/2)
  testit('atan2(-1, 1)', math.atan2(-1, 1), -math.pi/4)
! if sys.platform in ['unixware7']:
!     testit('atan2(0, 1)', math.atan2(0, 1), math.pi)
! else:
!     testit('atan2(0, 1)', math.atan2(0, 1), 0)
  testit('atan2(1, 1)', math.atan2(1, 1), math.pi/4)
  testit('atan2(1, 0)', math.atan2(1, 0), math.pi/2)
--- 36,40 ----
  testit('atan2(-1, 0)', math.atan2(-1, 0), -math.pi/2)
  testit('atan2(-1, 1)', math.atan2(-1, 1), -math.pi/4)
! testit('atan2(0, 1)', math.atan2(0, 1), 0)
  testit('atan2(1, 1)', math.atan2(1, 1), math.pi/4)
  testit('atan2(1, 0)', math.atan2(1, 0), math.pi/2)