mirror of
https://github.com/python/cpython.git
synced 2025-09-29 03:35:31 +00:00
merge 3.4
This commit is contained in:
commit
f01c782960
1 changed files with 0 additions and 5 deletions
|
@ -94,10 +94,6 @@ class GeneralFloatCases(unittest.TestCase):
|
||||||
|
|
||||||
def test_floatconversion(self):
|
def test_floatconversion(self):
|
||||||
# Make sure that calls to __float__() work properly
|
# Make sure that calls to __float__() work properly
|
||||||
class Foo0:
|
|
||||||
def __float__(self):
|
|
||||||
return 42.
|
|
||||||
|
|
||||||
class Foo1(object):
|
class Foo1(object):
|
||||||
def __float__(self):
|
def __float__(self):
|
||||||
return 42.
|
return 42.
|
||||||
|
@ -123,7 +119,6 @@ class GeneralFloatCases(unittest.TestCase):
|
||||||
def __float__(self):
|
def __float__(self):
|
||||||
return float(str(self)) + 1
|
return float(str(self)) + 1
|
||||||
|
|
||||||
self.assertAlmostEqual(float(Foo0()), 42.)
|
|
||||||
self.assertAlmostEqual(float(Foo1()), 42.)
|
self.assertAlmostEqual(float(Foo1()), 42.)
|
||||||
self.assertAlmostEqual(float(Foo2()), 42.)
|
self.assertAlmostEqual(float(Foo2()), 42.)
|
||||||
self.assertAlmostEqual(float(Foo3(21)), 42.)
|
self.assertAlmostEqual(float(Foo3(21)), 42.)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue