-
-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathpytest.ini
More file actions
40 lines (38 loc) · 2.08 KB
/
Copy pathpytest.ini
File metadata and controls
40 lines (38 loc) · 2.08 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
[pytest]
# -p no:unraisableexception: GC-time unraisable exceptions (e.g. from
# third-party destructors/asyncio teardown) get attributed to whatever test
# is running and, when their traceback cannot even be formatted, fail it
# with an unfilterable "Failed to process unraisable exception" error
# (https://github.com/pytest-dev/pytest/issues/14096); seen on Linux CI
# with Python 3.14.5.
# tui tests are skipped by default (each boots a headless Textual app, and
# textual is now an opt-in [tui] extra); run them explicitly with `-m tui`.
# -n logical --dist loadfile: run in parallel by default (~36 s vs ~130 s
# serial on an 8-core box, same coverage). `logical`, not `auto`: `auto` uses
# *physical* cores, which on the SMT runners in CI is half of what is
# available (the windows-latest runner reports 4 cores and got 2 workers).
# Much of the suite waits on disk and on spawned subprocesses rather than on
# the CPU, so the extra SMT workers do pay off there; on the Apple Silicon
# boxes, which have no SMT, `logical` and `auto` are the same number.
# `loadfile` keeps each file on one worker;
# `--dist load` splits modules across workers and segfaults test_ucodecs.py and
# test_prefilters.py, which register process-global codecs in a
# module-order-dependent way. `tests/conftest.py` gives every worker its own
# cwd so the tests writing fixed relative urlpaths do not collide.
# Pass `-n0` for a serial run (needed under emscripten/Pyodide, which cannot
# spawn workers); `--pdb` downgrades to `-n0` on its own.
addopts = --doctest-modules -m "not network and not heavy and not tui" -p no:unraisableexception -n logical --dist loadfile
testpaths =
tests
blosc2/core.py
blosc2/ndarray.py
blosc2/schunk.py
markers =
heavy: tests that take long time to complete.
network: tests that require network access.
tui: b2view Textual UI tests; each one boots a headless app session.
xdist_group: pin a module to one `-n` worker; declared here so it is not an
unknown mark (i.e. an error, given filterwarnings) when xdist is absent.
filterwarnings =
error
ignore::UserWarning