[Checkins] SVN: BTrees/branches/pure_python/ Coverage.
Tres Seaver
cvs-admin at zope.org
Tue Dec 4 21:49:46 UTC 2012
Log message for revision 128522:
Coverage.
Changed:
_U BTrees/branches/pure_python/
U BTrees/branches/pure_python/BTrees/tests/test__base.py
-=-
Modified: BTrees/branches/pure_python/BTrees/tests/test__base.py
===================================================================
--- BTrees/branches/pure_python/BTrees/tests/test__base.py 2012-12-04 21:49:45 UTC (rev 128521)
+++ BTrees/branches/pure_python/BTrees/tests/test__base.py 2012-12-04 21:49:45 UTC (rev 128522)
@@ -2825,7 +2825,22 @@
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):
self._mru = []
More information about the checkins
mailing list