zlmdb.tests.lmdb.address_book

Test low-level LMDB API (py-lmdb compatibility)

This test is based on the py-lmdb address-book.py example: https://github.com/jnwatson/py-lmdb/blob/master/examples/address-book.py

It demonstrates that zlmdb provides a fully compatible py-lmdb API for direct LMDB access.

Attributes

Functions

test_address_book_example(tmpdir)

Test the complete py-lmdb address-book example workflow.

test_lmdb_basic_operations(tmpdir)

Test basic LMDB operations through py-lmdb compatible API.

test_lmdb_cursor_operations(tmpdir)

Test cursor operations for iteration and positioning.

test_lmdb_environment_info(tmpdir)

Test environment info and statistics.

tmpdir

Module Contents

test_address_book_example(tmpdir)[source]

Test the complete py-lmdb address-book example workflow.

This verifies: - Environment creation with multiple databases - Subdatabase creation - Write transactions - Read transactions - Cursor iteration (sorted keys) - Update operations - Delete operations - Drop database operations

test_lmdb_basic_operations(tmpdir)[source]

Test basic LMDB operations through py-lmdb compatible API.

This is a simpler test focusing on core CRUD operations.

test_lmdb_cursor_operations(tmpdir)[source]

Test cursor operations for iteration and positioning.

test_lmdb_environment_info(tmpdir)[source]

Test environment info and statistics.

tmpdir()[source]

Create a temporary directory for test database

tmpdir[source]