-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpytest.ini
More file actions
64 lines (61 loc) · 2.78 KB
/
Copy pathpytest.ini
File metadata and controls
64 lines (61 loc) · 2.78 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
57
58
59
60
61
62
63
64
; pytest scope for c64-https.
;
; This repo's test suites are NOT pytest suites. The C64 suites under
; tools/ are driven by tools/run_all_tests.py, which allocates a VICE
; instance per suite and calls run_tests(transport, labels, seed); their
; `test_*` functions take positional arguments, not fixtures, so pytest
; can only ever report them as "fixture 'transport' not found". The live
; rig scripts in tests/ are main() programs needing sudo and a network
; rig (see tests/README.md), and those in tools/uci/ need a real U64E or
; C64U on the LAN (see tools/uci/README.md).
;
; Only a handful of modules are pure-logic and genuinely runnable by
; pytest. testpaths names them explicitly, so that `pytest` with no
; arguments from the repo root is a fixed, honest set rather than
; whatever the tree happens to look like, and so that it never wanders
; into directories where every file named test_*.py contributes zero
; tests (tests/, tools/uci/, libs/).
;
; testpaths only applies when pytest runs from the rootdir. That is why
; the rig scripts had to be RENAMED to rig_*.py as well, in tests/ and in
; tools/uci/ alike: a rename holds from any working directory, config
; does not.
;
; Both halves are enforced, in both directions, by
; tools/test_pytest_boundary.py: add a pure-logic tools/test_*.py module
; and that guard fails until you list it in testpaths; drop tests/ or
; tools/uci/ from norecursedirs, or let a test_*.py file reappear in
; either, and it fails too.
;
; A green run here does NOT mean the C64 test suites passed. conftest.py
; prints that on every invocation; do not remove it.
;
; ONE module here is not build-independent: test_uci_data_acc.py executes
; the shipped 6502 bytes out of build/c64-https.prg, so it needs a
; BACKEND=uci build in build/. That is deliberate — it is still pure-logic
; (no VICE, no hardware, 0.1 s) — but it means bare `pytest` at the root is
; RED on an ip65 or stale build, by design: an involuntary skip is a
; failure, never a silent pass (#158, #165). If you are working the ip65
; lane and want it out of the way, say so explicitly:
;
; C64_UCI_TESTS_OPTIONAL=1 pytest
;
; which skips it loudly and exits 0. Removing it from testpaths instead
; would trip tools/test_pytest_boundary.py.
[pytest]
testpaths =
tools/test_build_flags_stamp.py
tools/test_flags_stamp_skip_is_loud.py
tools/test_ip65_hw_checks_unit.py
tools/test_net_test_env.py
tools/test_package_verify.py
tools/test_pytest_boundary.py
tools/test_reu_preflight.py
tools/test_reserved_test_host.py
tools/test_rig_skip_contract.py
tools/test_runner_coverage.py
tools/test_skip_policy.py
tools/test_uci_data_acc.py
norecursedirs = .git libs ip65 ip65-build build dist tests tools/uci
; A collection error must never be mistaken for a passing run.
addopts = -ra