mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 10:01:00 +01:00
* test(backend): stop the suite emitting warnings The backend suite reported 4838 warnings. Three sources, all now clear: - 18 uses of the deprecated HTTP_422_UNPROCESSABLE_ENTITY, renamed to HTTP_422_UNPROCESSABLE_CONTENT. - Unawaited coroutines in the streaming and scan tests. A bare MagicMock drops the coroutine handed to spawn_sync_task, and a bare AsyncMock's return_value is itself an AsyncMock, so the to_dict() call on it leaked out of the scan handler. - About 4780 from sentry-sdk 2.32 and opentelemetry 1.36 calling asyncio.iscoroutinefunction, which Python 3.14 deprecates and 3.16 removes. Bumping both in the lock clears them. The remaining starlette warning wants httpx2 in place of the httpx 0.27 the metadata providers pin, so it is filtered rather than fixed: a second HTTP stack for the test client is a larger change than the warning justifies. 4815 passed, 2 skipped, 0 warnings. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> * test(backend): address review on the warning fixes Greptile flagged the pytest.ini rationale as over the two-line comment limit, and the new scan fake as untyped. Both fixed: the filter comment is one non-obvious fact, and the fake now takes `scan_stats` as a typed keyword-only parameter, which is a real contract rather than `**kwargs`. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>
33 lines
1.2 KiB
INI
33 lines
1.2 KiB
INI
[pytest]
|
|
asyncio_mode = auto
|
|
asyncio_default_fixture_loop_scope = function
|
|
testpaths = tests
|
|
env =
|
|
ROMM_BASE_PATH=romm_test
|
|
DB_HOST=127.0.0.1
|
|
DB_NAME=romm_test
|
|
DB_USER=romm_test
|
|
DB_PASSWD=passwd
|
|
D:ROMM_DB_DRIVER=mariadb
|
|
IGDB_CLIENT_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
IGDB_CLIENT_SECRET=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
RETROACHIEVEMENTS_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
MOBYGAMES_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
SCREENSCRAPER_USER=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
SCREENSCRAPER_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
STEAMGRIDDB_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
LAUNCHBOX_API_ENABLED=true
|
|
ROMM_AUTH_SECRET_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
|
ENABLE_RESCAN_ON_FILESYSTEM_CHANGE=true
|
|
ENABLE_SCHEDULED_RESCAN=true
|
|
ENABLE_SCHEDULED_UPDATE_SWITCH_TITLEDB=true
|
|
ENABLE_SCHEDULED_UPDATE_LAUNCHBOX_METADATA=true
|
|
LOGLEVEL=DEBUG
|
|
DEV_MODE=false
|
|
OIDC_ENABLED=false
|
|
|
|
filterwarnings =
|
|
# Backstop for upstream noise only; starlette's TestClient wants httpx2 while
|
|
# the metadata providers pin httpx 0.27.
|
|
ignore:Using `httpx` with `starlette.testclient` is deprecated:starlette.exceptions.StarletteDeprecationWarning
|