mirror of
				https://github.com/python/cpython.git
				synced 2025-11-04 07:31:38 +00:00 
			
		
		
		
	
							parent
							
								
									cd52023e6f
								
							
						
					
					
						commit
						feb8cade4d
					
				
					 2 changed files with 8 additions and 4 deletions
				
			
		| 
						 | 
					@ -5,6 +5,7 @@
 | 
				
			||||||
import math
 | 
					import math
 | 
				
			||||||
from math import isinf, isnan, copysign, ldexp
 | 
					from math import isinf, isnan, copysign, ldexp
 | 
				
			||||||
import operator
 | 
					import operator
 | 
				
			||||||
 | 
					import random, fractions
 | 
				
			||||||
 | 
					
 | 
				
			||||||
INF = float("inf")
 | 
					INF = float("inf")
 | 
				
			||||||
NAN = float("nan")
 | 
					NAN = float("nan")
 | 
				
			||||||
| 
						 | 
					@ -23,7 +24,7 @@ def test_float(self):
 | 
				
			||||||
        self.assertRaises(ValueError, float, "+-3.14")
 | 
					        self.assertRaises(ValueError, float, "+-3.14")
 | 
				
			||||||
        self.assertRaises(ValueError, float, "-+3.14")
 | 
					        self.assertRaises(ValueError, float, "-+3.14")
 | 
				
			||||||
        self.assertRaises(ValueError, float, "--3.14")
 | 
					        self.assertRaises(ValueError, float, "--3.14")
 | 
				
			||||||
        if have_unicode:
 | 
					        if test_support.have_unicode:
 | 
				
			||||||
            self.assertEqual(float(unicode("  3.14  ")), 3.14)
 | 
					            self.assertEqual(float(unicode("  3.14  ")), 3.14)
 | 
				
			||||||
            self.assertEqual(float(unicode("  \u0663.\u0661\u0664  ",'raw-unicode-escape')), 3.14)
 | 
					            self.assertEqual(float(unicode("  \u0663.\u0661\u0664  ",'raw-unicode-escape')), 3.14)
 | 
				
			||||||
            # Implementation limitation in PyFloat_FromString()
 | 
					            # Implementation limitation in PyFloat_FromString()
 | 
				
			||||||
| 
						 | 
					@ -736,6 +737,7 @@ def roundtrip(x):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test_main():
 | 
					def test_main():
 | 
				
			||||||
    test_support.run_unittest(
 | 
					    test_support.run_unittest(
 | 
				
			||||||
 | 
					        GeneralFloatCases,
 | 
				
			||||||
        FormatFunctionsTestCase,
 | 
					        FormatFunctionsTestCase,
 | 
				
			||||||
        UnknownFormatTestCase,
 | 
					        UnknownFormatTestCase,
 | 
				
			||||||
        IEEEFormatTestCase,
 | 
					        IEEEFormatTestCase,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -114,13 +114,15 @@ Extension Modules
 | 
				
			||||||
Tests
 | 
					Tests
 | 
				
			||||||
-----
 | 
					-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Issue 3768: Move test_py3kwarn over to the new API for catch_warnings().
 | 
					- Issue #3796: Some tests functions were not enabled in test_float.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					- Issue #3768: Move test_py3kwarn over to the new API for catch_warnings().
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Build
 | 
					Build
 | 
				
			||||||
-----
 | 
					-----
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- Issue 3758: Rename the 'check' target to 'patchcheck' so as to not clash with
 | 
					- Issue #3758: Rename the 'check' target to 'patchcheck' so as to not clash 
 | 
				
			||||||
  GNU build target guidelines.
 | 
					  with GNU build target guidelines.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
What's New in Python 2.6 beta 3?
 | 
					What's New in Python 2.6 beta 3?
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue