コード例 #1
0
 def testRandom(self):
     want = randBytes(random.randint(1, 1 << 20))  # 1B to 1 MB
     got = snappy_pure.decompress(snappy.compress(want))
     if got != want:
         raise AssertionError('got %r, want %r' % (got, want))
コード例 #2
0
ファイル: snappy_pure_test.py プロジェクト: StalkR/misc
 def testRandom(self):
   want = randBytes(random.randint(1, 1<<20))  # 1B to 1 MB
   got = snappy_pure.decompress(snappy.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_pure.decompress(snappy.compress(want))
     if got != want:
         raise AssertionError('got %r, want %r' % (got, want))
コード例 #4
0
ファイル: snappy_pure_test.py プロジェクト: StalkR/misc
 def testFile(self):
   want = open('/etc/passwd', 'r').read()
   got = snappy_pure.decompress(snappy.compress(want))
   if got != want:
     raise AssertionError('got %r, want %r' % (got, want))