mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 02:15:10 +00:00 
			
		
		
		
	 04f357cffe
			
		
	
	
		04f357cffe
		
	
	
	
	
		
			
			imports e.g. test_support must do so using an absolute package name such as "import test.test_support" or "from test import test_support". This also updates the README in Lib/test, and gets rid of the duplicate data dirctory in Lib/test/data (replaced by Lib/email/test/data). Now Tim and Jack can have at it. :)
		
			
				
	
	
		
			35 lines
		
	
	
	
		
			813 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
	
		
			813 B
		
	
	
	
		
			Python
		
	
	
		
			Executable file
		
	
	
	
	
| #! /usr/bin/env python
 | |
| """ Simple test script for cmathmodule.c
 | |
|     Roger E. Masse
 | |
| """
 | |
| import cmath
 | |
| from test.test_support import verbose
 | |
| 
 | |
| testdict = {'acos' : 1.0,
 | |
|             'acosh' : 1.0,
 | |
|             'asin' : 1.0,
 | |
|             'asinh' : 1.0,
 | |
|             'atan' : 0.2,
 | |
|             'atanh' : 0.2,
 | |
|             'cos' : 1.0,
 | |
|             'cosh' : 1.0,
 | |
|             'exp' : 1.0,
 | |
|             'log' : 1.0,
 | |
|             'log10' : 1.0,
 | |
|             'sin' : 1.0,
 | |
|             'sinh' : 1.0,
 | |
|             'sqrt' : 1.0,
 | |
|             'tan' : 1.0,
 | |
|             'tanh' : 1.0}
 | |
| 
 | |
| for func in testdict.keys():
 | |
|     f = getattr(cmath, func)
 | |
|     r = f(testdict[func])
 | |
|     if verbose:
 | |
|         print 'Calling %s(%f) = %f' % (func, testdict[func], abs(r))
 | |
| 
 | |
| p = cmath.pi
 | |
| e = cmath.e
 | |
| if verbose:
 | |
|     print 'PI = ', abs(p)
 | |
|     print 'E = ', abs(e)
 |