Files
nanobot/tests
code-server 97d5bd3c4d
Build Nanobot OAuth / build (pull_request) Successful in 45s
Build Nanobot OAuth / cleanup (pull_request) Has been skipped
fix: resolve test suite warnings (RuntimeWarning, DeprecationWarning)
Fixes all critical warnings from test suite:

1. **DeprecationWarning: datetime.utcnow()** (anthropic_oauth.py:458)
   - Replace `datetime.utcnow()` with `datetime.now(datetime.UTC)`
   - Python 3.12+ deprecation, will be removed in future versions
   - Affects API header debug logging

2. **RuntimeWarning: unawaited coroutine** (test_agent_loop_tool_result.py:31)
   - Change `session_mgr.save = AsyncMock()` to `MagicMock()`
   - Mock was async but production code is synchronous
   - Affected 4 tests (tool result handling tests)

**Test Results:**
```
======================= 277 passed in 7.61s =======================
```

All RuntimeWarning and DeprecationWarning eliminated from nanobot tests.

Note: PytestCacheWarning persists due to root-owned .pytest_cache directory
(cosmetic only, run with `-p no:cacheprovider` for clean output).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-03-06 05:20:46 +00:00
..
2026-03-05 20:22:50 +01:00