fix(pytest): Workaround unraisableexception plugin crash
Disables the unraisableexception plugin in pytest due to a known bug in pytest>=9.1 where it crashes with tracemalloc errors when multiple unraisable exceptions occur close together.
This commit is contained in:
@@ -116,6 +116,12 @@ python_functions = ["test_*"]
|
|||||||
addopts = [
|
addopts = [
|
||||||
"-v",
|
"-v",
|
||||||
"--strict-markers",
|
"--strict-markers",
|
||||||
|
# pytest>=9.1 has a known bug where its unraisableexception plugin crashes
|
||||||
|
# (tracemalloc partially-initialized AttributeError) when 2+ unraisable
|
||||||
|
# exceptions land close together — e.g. "coroutine was never awaited" from
|
||||||
|
# AsyncMock-mocked sync methods (metrics_controller, minio_repository) being
|
||||||
|
# GC'd. Harmless mock artifacts turned into a hard ERROR by the plugin itself.
|
||||||
|
"-p", "no:unraisableexception",
|
||||||
]
|
]
|
||||||
markers = [
|
markers = [
|
||||||
"asyncio: marks tests as async",
|
"asyncio: marks tests as async",
|
||||||
|
|||||||
Reference in New Issue
Block a user