MCPcopy Create free account
hub / github.com/tortoise/tortoise-orm / db_simple

Function db_simple

conftest.py:112–126  ·  view source on GitHub ↗

Function-scoped fixture with NO cleanup between tests. Tests share state - data from one test persists to the next within the module. Use ONLY for read-only tests or tests that manage their own cleanup. Usage: @pytest.mark.asyncio async def test_read_only(db_simple

(db_module)

Source from the content-addressed store, hash-verified

110
111@pytest_asyncio.fixture(scope="function")
112async def db_simple(db_module):
113 """
114 Function-scoped fixture with NO cleanup between tests.
115
116 Tests share state - data from one test persists to the next within the module.
117 Use ONLY for read-only tests or tests that manage their own cleanup.
118
119 Usage:
120 @pytest.mark.asyncio
121 async def test_read_only(db_simple):
122 # Read-only operations, no writes
123 config = get_config()
124 assert "host" in config
125 """
126 yield db_module
127
128
129@pytest_asyncio.fixture(scope="function")

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…