diff options
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/test/test_builtin.py | 27 | ||||
| -rw-r--r-- | Lib/test/test_sys.py | 2 |
2 files changed, 1 insertions, 28 deletions
diff --git a/Lib/test/test_builtin.py b/Lib/test/test_builtin.py index 8c46ab8eb3..15d80a3698 100644 --- a/Lib/test/test_builtin.py +++ b/Lib/test/test_builtin.py @@ -631,15 +631,6 @@ class BuiltinTest(unittest.TestCase): self.assertEqual(hex(-16), '-0x10') self.assertEqual(hex(-16L), '-0x10L') self.assertRaises(TypeError, hex, {}) - self.assertEqual(hex(3.125), '0x19 * 2.0 ** -3') - self.assertEqual(hex(0.0), '0x0 * 2.0 ** 0') - for sv in float('nan'), float('inf'), float('-inf'): - self.assertEqual(hex(sv), repr(sv)) - for i in range(100): - x = random.expovariate(.05) - self.assertEqual(eval(hex(x)), x, (x, hex(x), eval(hex(x)))) - self.assertEqual(eval(hex(-x)), -x) - self.assertEqual(hex(-x), ('-' + hex(x))) def test_id(self): id(None) @@ -923,15 +914,6 @@ class BuiltinTest(unittest.TestCase): self.assertEqual(oct(-100), '-0144') self.assertEqual(oct(-100L), '-0144L') self.assertRaises(TypeError, oct, ()) - self.assertEqual(oct(3.125), '031 * 2.0 ** -3') - self.assertEqual(oct(0.0), '0 * 2.0 ** 0') - for sv in float('nan'), float('inf'), float('-inf'): - self.assertEqual(oct(sv), repr(sv)) - for i in range(100): - x = random.expovariate(.05) - self.assertEqual(eval(oct(x)), x) - self.assertEqual(eval(oct(-x)), -x) - self.assertEqual(oct(-x), ('-' + oct(x))) def write_testfile(self): # NB the first 4 lines are also used to test input and raw_input, below @@ -1484,15 +1466,6 @@ class BuiltinTest(unittest.TestCase): self.assertEqual(bin(2**65-1), '0b' + '1' * 65) self.assertEqual(bin(-(2**65)), '-0b1' + '0' * 65) self.assertEqual(bin(-(2**65-1)), '-0b' + '1' * 65) - self.assertEqual(bin(3.125), '0b11001 * 2.0 ** -3') - self.assertEqual(bin(0.0), '0b0 * 2.0 ** 0') - for sv in float('nan'), float('inf'), float('-inf'): - self.assertEqual(bin(sv), repr(sv)) - for i in range(100): - x = random.expovariate(.05) - self.assertEqual(eval(bin(x)), x) - self.assertEqual(eval(bin(-x)), -x) - self.assertEqual(bin(-x), ('-' + bin(x))) class TestSorted(unittest.TestCase): diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index c98117ac5b..f1fb61549e 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -523,7 +523,7 @@ class SizeofTest(unittest.TestCase): len_typeobject = p + 2*l + 15*p + l + 4*p + l + 9*p +\ l + 11*p + self.align(4) self.check_sizeof(class_newstyle, - h + len_typeobject + 42*p + 10*p + 3*p + 6*p) + h + len_typeobject + 41*p + 10*p + 3*p + 6*p) def test_specialtypes(self): i = self.i |
