Files
darth-veitcher cc8cda69a1 test: Suppress harmless RuntimeWarnings from mock internals
The warnings about unawaited coroutines come from unittest.mock's
internal handling of async functions during test cleanup, not from
our actual code. These are false positives that occur when:

1. Mock objects reference async functions
2. pytest pickles/copies these mocks for test isolation
3. Python's garbage collector finds unawaited coroutines

This is a known limitation of unittest.mock with async code.
Our actual code properly awaits all async functions.

Added comprehensive filterwarnings to pyproject.toml to suppress
these false positives while still catching real issues.

All 108 tests passing with clean output ✅
2025-11-03 11:28:21 +00:00

55 lines
1.6 KiB
TOML

[project]
name = "comfyui-ollama-model-manager"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
authors = [
{ name = "darth-veitcher", email = "1722315+darth-veitcher@users.noreply.github.com" }
]
requires-python = ">=3.12"
dependencies = [
"httpx>=0.28.1",
"loguru>=0.7.3",
"rich>=14.2.0",
]
[build-system]
requires = ["uv_build>=0.8.22,<0.9.0"]
build-backend = "uv_build"
[dependency-groups]
dev = [
"pytest>=8.4.2",
"pytest-asyncio>=1.2.0",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--strict-markers",
"--tb=short",
]
markers = [
"asyncio: marks tests as async (deselect with '-m \"not asyncio\"')",
"integration: marks tests as integration tests (deselect with '-m \"not integration\"')",
]
filterwarnings = [
# Ignore warnings about unawaited coroutines from mock internals
# These occur when pytest pickles/copies mock objects that reference async functions
# This is a known issue with unittest.mock and async functions - not our code's fault
"ignore:coroutine.*was never awaited:RuntimeWarning",
"ignore::RuntimeWarning:copyreg",
"ignore::RuntimeWarning:unittest.mock",
"ignore::RuntimeWarning:warnings",
"ignore::RuntimeWarning:contextlib",
"ignore::RuntimeWarning:json.encoder",
"ignore::RuntimeWarning:re._parser",
"ignore::RuntimeWarning:loguru._datetime",
"ignore::RuntimeWarning:_pytest.unraisableexception",
"ignore::RuntimeWarning:loguru._colorizer",
]