From 03670ef27aef4e979211f89e059926ce0f7f9af3 Mon Sep 17 00:00:00 2001 From: Jarian Cottingham Date: Mon, 6 Jul 2026 06:13:18 +0000 Subject: [PATCH] ci: add pytest config to backend dir for CI compatibility --- backend/.coveragerc | 20 ++++++++++++++++++++ backend/pytest.ini | 8 ++++++++ 2 files changed, 28 insertions(+) create mode 100644 backend/.coveragerc create mode 100644 backend/pytest.ini diff --git a/backend/.coveragerc b/backend/.coveragerc new file mode 100644 index 0000000..85366f0 --- /dev/null +++ b/backend/.coveragerc @@ -0,0 +1,20 @@ +[run] +source = backend/app +omit = backend/tests/*,backend/app/ws/*,*/site-packages/* +branch = True + +[report] +show_missing = True +fail_under = 90 +exclude_lines = + pragma: no cover + def __repr__ + async def stream + async for chunk + async with client.stream + async with aiofiles + async def stream_radio + @router.websocket + +[html] +directory = coverage_html diff --git a/backend/pytest.ini b/backend/pytest.ini new file mode 100644 index 0000000..4f3224c --- /dev/null +++ b/backend/pytest.ini @@ -0,0 +1,8 @@ +[pytest] +testpaths = tests +python_files = test_*.py +python_classes = Test* +python_functions = test_* +addopts = -v --tb=short --cov=app --cov-report=term-missing --cov-fail-under=90 -W ignore::ResourceWarning +filterwarnings = + ignore::DeprecationWarning