Update the tests.

This commit is contained in:
hofmockel 2014-10-22 20:54:25 +02:00
parent 7e1df8bec1
commit 9cf520a77b
2 changed files with 6 additions and 12 deletions

View file

@ -340,6 +340,6 @@ class TestPrefixExtractor(unittest.TestCase, TestHelper):
it = self.db.iteritems()
it.seek(b'00002')
ref = {'00002.z': 'z', '00002.y': 'y', '00002.x': 'x'}
ref = {b'00002.z': b'z', b'00002.y': b'y', b'00002.x': b'x'}
ret = takewhile(lambda item: item[0].startswith(b'00002'), it)
self.assertEqual(ref, dict(ret))

View file

@ -28,11 +28,6 @@ class TestOptions(unittest.TestCase):
opts.paranoid_checks = False
self.assertEqual(False, opts.paranoid_checks)
self.assertIsNone(opts.filter_policy)
ob = TestFilterPolicy()
opts.filter_policy = ob
self.assertEqual(opts.filter_policy, ob)
self.assertIsNone(opts.merge_operator)
ob = TestMergeOperator()
opts.merge_operator = ob
@ -46,12 +41,11 @@ class TestOptions(unittest.TestCase):
opts.compression = rocksdb.CompressionType.no_compression
self.assertEqual('no_compression', opts.compression)
self.assertEqual(opts.block_size, 4096)
self.assertIsNone(opts.block_cache)
ob = rocksdb.LRUCache(100)
opts.block_cache = ob
self.assertEqual(ob, opts.block_cache)
def test_block_options(self):
rocksdb.BlockBasedTableFactory(
block_size=4096,
filter_policy=TestFilterPolicy(),
block_cache=rocksdb.LRUCache(100))
def test_unicode_path(self):
name = b'/tmp/M\xc3\xbcnchen'.decode('utf8')