-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpytest.ini
More file actions
22 lines (22 loc) · 1.39 KB
/
Copy pathpytest.ini
File metadata and controls
22 lines (22 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
[pytest]
# importlib mode makes pytest treat tests/ as a normal package tree rather
# than auto-injecting parent dirs onto sys.path. Default "prepend" mode
# collides when project source (pkm/) and a test subdir (tests/pkm/) share
# a leaf name — pytest tries to import tests as `pkm.test_*` and fails on
# the namespace collision (cross-host: Ubuntu Python 3.12 pytest 9.0.2
# + bare-metal Python 3.14 pytest 9.0.3 both reproduce).
#
# importlib mode bypasses the path-injection logic, lets tests import via
# absolute module paths, and works regardless of __init__.py presence
# across the tests/ tree. Adopting as project default avoids the
# host-specific incantation `--import-mode=importlib` at every invocation.
addopts = --import-mode=importlib
# Deterministic collection roots: an unbounded root made "full suite
# green" venue-dependent — collection varied with git-working-copy
# status and a missing optional module aborted the whole run. The
# explicit fourth root keeps the nvidia eula-helper tests collected
# (they live inside the package tree, outside the three main roots) —
# re-homed, never dropped. The fifth root does the same for the steam
# package's game-window-density tests, which sit beside the command they
# exercise so the recipe and the command stay reviewed together.
testpaths = tests intergen/tests installer/tests packages/extra/nvidia/eula-helper/tests packages/extra/steam/tests