~amirouche/python-okvs

9212bb8e5027484e4d3a4522913a4ae8d12483aa — Amirouche 10 months ago 3feeded
cosmit!
1 files changed, 7 insertions(+), 4 deletions(-)

M tests.py
M tests.py => tests.py +7 -4
@@ 26,6 26,7 @@ def test_db_get():
        assert db.get(cnx, b'\x42') is None
        db.close(cnx)


def test_db_setget():
    with tempfile() as filepath:
        cnx = db.open(filepath)


@@ 41,7 42,7 @@ def test_db_query():
        db.close(cnx)


def test_db_setquery():
def test_db_set_and_query():
    with tempfile() as filepath:
        cnx = db.open(filepath)
        expected = [


@@ 54,7 55,8 @@ def test_db_setquery():
        assert list(db.query(cnx, b'\x00', b'\xFF')) == expected
        db.close(cnx)

def test_db_setquery_desc():

def test_db_set_and_query_desc():
    with tempfile() as filepath:
        cnx = db.open(filepath)
        expected = [


@@ 145,6 147,7 @@ def test_db_size2():

def test_db_delete():
    with tempfile() as filepath:
        # WHEN
        cnx = db.open(filepath)
        kvs = [
            (b'\x00', b'\x01'),


@@ 166,12 169,12 @@ def test_db_delete():
        db.close(cnx)


def test_db_packunpack():
def test_db_pack_unpack():
    expected = (None, True, False, 42, 0, -42, "abcdef", b'\xc0ff33', (1337, None))
    assert db.unpack(db.pack(expected)) == expected


def test_db_sortedpack():
def test_db_sorted_pack():
    given = (
        ((-100,), (0,)),
        ((0,), (100,)),