-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathpyproject.toml
More file actions
43 lines (41 loc) · 2.19 KB
/
Copy pathpyproject.toml
File metadata and controls
43 lines (41 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
[tool.uv.workspace]
members = ["src/klangk", "src/klangksidecar"]
# Root pytest config — a safety net for invocations whose rootdir
# resolves to the repo root (e.g. `pytest` with no args, or a multi-dir
# run whose common ancestor is the repo root). Normal runs target the
# two unit dirs under src/klangk/ (klangkd-tests/tests,
# klangkc-tests/tests); their common ancestor src/klangk/ has the
# pyproject whose ``addopts`` (coverage + 100% gate over klangk)
# applies, so this block is not consulted. This block mirrors the
# essentials (asyncio mode, capture) so a root-level invocation doesn't
# regress. See #1393 for the original config-discovery note.
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
# ``--capture=no``: the CLI ``run_shell`` integration tests spawn a
# ``stdin_loop`` that calls ``stdin.fileno()``, which blows up on
# pytest's captured stdin (``DontReadFromInput``). Mirrored from
# src/klangk/pyproject.toml. No coverage here — the 100% gate lives
# in src/klangk/pyproject.toml.
addopts = "--capture=no"
# Suppress unawaited-coroutine warnings that surface when MagicMock stubs
# create coroutine objects (e.g. ws_shell, sandbox_setup_only) that are
# garbage-collected in a later test. These are mock-induced GC artifacts,
# not real bugs.
filterwarnings = [
"ignore::pytest.PytestUnraisableExceptionWarning",
"ignore:coroutine .* was never awaited:RuntimeWarning",
]
# Shared coverage config for every pytest-cov run whose CWD is the repo
# root — coverage discovers [tool.coverage.run] relative to the CWD, not
# the pytest rootdir, and the documented invocations (CI, devenv tasks)
# all run from here. Branch measurement (#2834) rides the sysmon core
# (pinned in both klangk conftests): Python 3.14's sys.monitoring gained
# BRANCH_LEFT/RIGHT events, and sysmon tracks code executed inside
# SQLAlchemy's greenlet context natively (#456/#1393) — no
# ``concurrency`` option, which sysmon does not support (the C tracer
# needed ``concurrency=["greenlet", "thread"]`` for the same result,
# ~40% slower). No 3.13 fallback: the toolchain is pinned to 3.14
# (#2844), and CI runs the suites on 3.14 exclusively.
[tool.coverage.run]
branch = true