Пример #1
0
 def testRandom(self):
     want = randBytes(random.randint(1, 1 << 20))  # 1B to 1 MB
     got = snappy.decompress(snappy_pure.compress(want))
     if got != want:
         raise AssertionError('got %r, want %r' % (got, want))
Пример #2
0
 def testRandom(self):
   want = randBytes(random.randint(1, 1<<20))  # 1B to 1 MB
   got = snappy.decompress(snappy_pure.compress(want))
   if got != want:
     raise AssertionError('got %r, want %r' % (got, want))
Пример #3
0
 def testFile(self):
     want = open('/etc/passwd', 'r').read()
     got = snappy.decompress(snappy_pure.compress(want))
     if got != want:
         raise AssertionError('got %r, want %r' % (got, want))
Пример #4
0
 def testFile(self):
   want = open('/etc/passwd', 'r').read()
   got = snappy.decompress(snappy_pure.compress(want))
   if got != want:
     raise AssertionError('got %r, want %r' % (got, want))