Repository navigation
Expand file tree
/
Copy pathpytest.ini
More file actions
56 lines (56 loc) · 3.39 KB
/
Copy pathpytest.ini
File metadata and controls
56 lines (56 loc) · 3.39 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
44
45
46
47
48
49
50
51
52
53
54
55
56
[pytest]
testpaths = tests
pythonpath = .
# Coverage is DELIBERATELY NOT in addopts. The suite is ~6000 tests and
# instrumenting every local run is a tax paid on every edit-test cycle for a
# number nobody reads most of the time. Ask for it when you want it:
#
# pytest --cov=engine --cov-report=term-missing:skip-covered
#
# Needs the dev extra (`pip install -e .[dev]`) for pytest-cov.
#
# THE STALL WATCHDOG (v0.21.1). Every test has a limit: 300 s, 900 s for a
# slow/process test (tests/tier_plugin.py; CLOCKWORK_TIMEOUT_SCALE stretches
# both; CI is to set 2, in T7). The thread method dumps every thread's stack
# and ends the process -- a hang becomes a failure with a traceback, never a run that sits
# forever (two runs hung in v0.21.0: a leaked agent server, an unbounded
# socketpair). faulthandler_timeout is 0 (off): its watchdog read running
# threads' frames without the GIL and crashed the run with an access
# violation (0xC0000005) in a test past 120 s (v0.21.1 T4, 3 runs of 3).
# pytest-timeout's own dump is taken safely; crash tracebacks stay on.
# A `process` test uses the signal method where there is one (POSIX), so its
# fixtures still stop their children; on Windows the session's own Job Object
# (tests/conftest.py, tests/process_jobs.py) ends what a timed-out test leaves.
timeout = 300
timeout_method = thread
faulthandler_timeout = 0
markers =
live: this test is ALLOWED to open a real connection to the model server.
Everything else is blocked by the autouse guard in tests/conftest.py --
see its docstring for why (69% of the suite's wall clock was one file
calling LM Studio while believing it was mocked). Also the only way past
the guard on the Grok image CLI (conftest `_no_real_grok_cli`).
real_discovery: this test is ABOUT model discovery, so the conftest pin that
answers it with an empty model list must not replace the code under
test. The socket guard still applies -- the test's own mocks have to be
complete.
mcp_server: this test is ALLOWED to start a real skills server
(SkillsServer.start). Everything else is refused by the autouse guard
in tests/conftest.py (`_no_owner_lm_studio_files`), and every test's
mcp.json is redirected into its temp directory, marked or not.
default_storage_root: this test does NOT get the per-test
CLOCKWORK_DATA_DIR the autouse saves guard in tests/conftest.py
(`_no_test_writes_real_saves`) sets, because it pins what the DEFAULT
storage root resolves to (the local-mode golden's save_base.json). The
audit hook on the real saves/, users/ and hosting/ still applies.
slow: measures balance or plays a long run (rule 10: keeps its length),
or waits on a wall clock already at its setting's floor. Left out
of a bare `pytest`; `--full` or any explicit path runs it.
process: starts a Python interpreter, gunicorn or a hosted supervisor
(it or a fixture it uses). Left out of a bare `pytest`. Enforced
for direct Popen children: an unmarked test that starts one, or
uses a fixture that did, fails (tests/tier_plugin.py).
loopback: binds an in-process loopback server (a bus, a front door, a
WSGI or health server), it or a fixture it uses. Runs in the
hybrid full run's serial phase (tests/tiers.py::SERIAL_MARKS).
Enforced: an unmarked test that binds one fails (tests/tier_plugin.py).