Commit 9c2a03e7 authored by Tres Seaver's avatar Tres Seaver

Coverage.

parent cf877722
......@@ -2825,6 +2825,21 @@ class Test_converters(unittest.TestCase):
faux_self = object()
self.assertRaises(TypeError, to_int, faux_self, sys.maxint + 1)
def test_to_float_w_float(self):
from BTrees._base import to_float
faux_self = object()
self.assertEqual(to_float(faux_self, 3.14159), 3.14159)
def test_to_float_w_int(self):
from BTrees._base import to_float
faux_self = object()
self.assertEqual(to_float(faux_self, 3), 3.0)
def test_to_float_w_invalid(self):
from BTrees._base import to_float
faux_self = object()
self.assertRaises(TypeError, to_float, faux_self, ())
class _Cache(object):
def __init__(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment