Example #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))
Example #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))
Example #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))
Example #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))