Skip to content

Commit 6730ea6

Browse files
antonsyndclaude
andcommitted
fix: Suppress test warnings in build_tools Python tests
- Suppress HumanLoopManager deprecation warning in Orchestrator since it's intentionally kept for backwards compatibility with batch workflows - Add pytest.ini to filter RuntimeWarning about unawaited coroutines which are artifacts of mocking async code, not actual issues Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6f42de8 commit 6730ea6

File tree

2 files changed

+19
-5
lines changed

2 files changed

+19
-5
lines changed

build_tools/pytest.ini

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[pytest]
2+
asyncio_mode = auto
3+
asyncio_default_fixture_loop_scope = function
4+
5+
# Filter warnings that are artifacts of mocking async code, not actual issues
6+
filterwarnings =
7+
# Coroutine warnings from mocked async subprocess communication
8+
# These occur when unittest.mock interacts with asyncio coroutines during cleanup
9+
ignore:coroutine .* was never awaited:RuntimeWarning

build_tools/sharpy_auto_builder/orchestrator/core.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"""
77

88
import sys
9+
import warnings
910
from datetime import datetime
1011
from pathlib import Path
1112
from typing import Optional
@@ -74,11 +75,15 @@ def __init__(self, config: Config):
7475

7576
# Initialize components
7677
self.backend_manager = BackendManager(config)
77-
self.human_loop = HumanLoopManager(
78-
config.questions_dir,
79-
config.answers_dir,
80-
config.human_review_dir,
81-
)
78+
# HumanLoopManager is deprecated but kept for backwards compatibility with
79+
# batch processing workflows. Suppress the warning since we're aware of it.
80+
with warnings.catch_warnings():
81+
warnings.filterwarnings("ignore", category=DeprecationWarning)
82+
self.human_loop = HumanLoopManager(
83+
config.questions_dir,
84+
config.answers_dir,
85+
config.human_review_dir,
86+
)
8287

8388
# Initialize response analyzer and auto-decision engine (Overseer components)
8489
self.response_analyzer = ResponseAnalyzer(

0 commit comments

Comments
 (0)