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