ruff gains RUF100, PLW1510 and flake8-bugbear, every hit fixed rather than ignored. B008 stays on with FastAPI's Depends/Query declared immutable. basedpyright moves to standard mode, pytest to --strict-markers, and a hand run of pytest now requires the database unless SIFTLODE_TEST_REQUIRE_DB=0. PLW1510 found a real bug: the three ffprobe probes in plex/stream.py never looked at the exit status, so a probe that failed was read as the file's truth (an HDR source sent down the HW-safe path, a multi-audio file collapsed to one track, a subtitle offset taken from garbage) and the warning each except branch promises never fired. They now run with check=True.
11 lines
618 B
INI
11 lines
618 B
INI
[pytest]
|
|
# Run from backend/ (the image's /app). `pythonpath = .` puts the app package on sys.path so tests
|
|
# import it as `app.*`, matching runtime. Most of the suite is pure-logic; the DB-backed lane opts in
|
|
# via the `db` fixture and runs in the compose test image. `-rs` reports skip REASONS so a silently
|
|
# skipped lane is visible (and conftest makes a missing DB/ffmpeg a hard error unless
|
|
# SIFTLODE_TEST_REQUIRE_DB=0). `--strict-markers` (E32): a misspelt `@pytest.mark.skipiff` is an error,
|
|
# not an unknown marker that quietly does nothing.
|
|
testpaths = tests
|
|
pythonpath = .
|
|
addopts = -q -rs --strict-markers
|