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