Esempio n. 1
0
 def testInt2b128(self):
     funkylist = range(0,100) + range(1000,1100) + range(1000000,1000100) + [1024 **10l]
     for i in funkylist:
         x = StringIO.StringIO()
         banana.int2b128(i, x.write)
         v = x.getvalue()
         y = banana.b1282int(v)
         assert y == i, "y = %s; i = %s" % (y,i)
Esempio n. 2
0
 def testInt2b128(self):
     funkylist = range(0,100) + range(1000,1100) + range(1000000,1000100) + [1024 **10l]
     for i in funkylist:
         x = StringIO.StringIO()
         banana.int2b128(i, x.write)
         v = x.getvalue()
         y = banana.b1282int(v)
         assert y == i, "y = %s; i = %s" % (y,i)
Esempio n. 3
0
 def test_int2b128(self):
     funkylist = (list(range(0, 100)) + list(range(1000, 1100)) +
                  list(range(1000000, 1000100)) + [1024**10])
     for i in funkylist:
         x = BytesIO()
         banana.int2b128(i, x.write)
         v = x.getvalue()
         y = banana.b1282int(v)
         self.assertEqual(y, i)
Esempio n. 4
0
 def test_int2b128(self):
     funkylist = (list(range(0,100)) + list(range(1000,1100)) +
                 list(range(1000000,1000100)) + [1024 **10])
     for i in funkylist:
         x = BytesIO()
         banana.int2b128(i, x.write)
         v = x.getvalue()
         y = banana.b1282int(v)
         self.assertEqual(y, i)