Пример #1
0
 def test64(self):
     from zope.interface.verify import verifyObject
     import BTrees
     from BTrees.LOBTree import LOTreeSet
     verifyObject(BTrees.Interfaces.IBTreeFamily, BTrees.family64)
     self.assertEqual(
         BTrees.family64.IO, BTrees.LOBTree)
     self.assertEqual(
         BTrees.family64.OI, BTrees.OLBTree)
     self.assertEqual(
         BTrees.family64.II, BTrees.LLBTree)
     self.assertEqual(
         BTrees.family64.IF, BTrees.LFBTree)
     self.assertEqual(
         BTrees.family64.OO, BTrees.OOBTree)
     s = LOTreeSet()
     s.insert(BTrees.family64.maxint)
     self.assertTrue(BTrees.family64.maxint in s)
     s = LOTreeSet()
     s.insert(BTrees.family64.minint)
     self.assertTrue(BTrees.family64.minint in s)
     s = LOTreeSet()
     # XXX why oh why do we expect ValueError here, but TypeError in test32?
     self.assertRaises(ValueError, s.insert, BTrees.family64.maxint + 1)
     self.assertRaises(ValueError, s.insert, BTrees.family64.minint - 1)
     self.check_pickling(BTrees.family64)
Пример #2
0
 def test64(self):
     from zope.interface.verify import verifyObject
     import BTrees
     from BTrees.LOBTree import LOTreeSet
     verifyObject(BTrees.Interfaces.IBTreeFamily, BTrees.family64)
     self.assertEqual(
         BTrees.family64.IO, BTrees.LOBTree)
     self.assertEqual(
         BTrees.family64.OI, BTrees.OLBTree)
     self.assertEqual(
         BTrees.family64.II, BTrees.LLBTree)
     self.assertEqual(
         BTrees.family64.IF, BTrees.LFBTree)
     self.assertEqual(
         BTrees.family64.OO, BTrees.OOBTree)
     s = LOTreeSet()
     s.insert(BTrees.family64.maxint)
     self.assertTrue(BTrees.family64.maxint in s)
     s = LOTreeSet()
     s.insert(BTrees.family64.minint)
     self.assertTrue(BTrees.family64.minint in s)
     s = LOTreeSet()
     # XXX why oh why do we expect ValueError here, but TypeError in test32?
     self.assertRaises(ValueError, s.insert, BTrees.family64.maxint + 1)
     self.assertRaises(ValueError, s.insert, BTrees.family64.minint - 1)
     self.check_pickling(BTrees.family64)
Пример #3
0
 def _makeOne(self):
     from BTrees.LOBTree import LOTreeSet
     return LOTreeSet()