MCPcopy
hub / github.com/tortoise/tortoise-orm / configure_psycopg

Function configure_psycopg

conftest.py:16–23  ·  view source on GitHub ↗

Configure psycopg timeout for faster tests.

()

Source from the content-addressed store, hash-verified

14
15@pytest.fixture(scope="session", autouse=True)
16def configure_psycopg():
17 """Configure psycopg timeout for faster tests."""
18 try:
19 from tortoise.backends.psycopg import PsycopgClient
20
21 PsycopgClient.default_timeout = float(os.environ.get("TORTOISE_POSTGRES_TIMEOUT", "15"))
22 except ImportError:
23 pass
24
25
26# ============================================================================

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…