test: speed up CI and harden the suite

This commit is contained in:
chengyongru
2026-07-15 00:18:37 +08:00
committed by chengyongru
parent 06f47fa540
commit 2116e32013
33 changed files with 453 additions and 240 deletions
+1 -1
View File
@@ -1,6 +1,7 @@
"""Tests for abbreviate_path utility."""
import os
from nanobot.utils.path import abbreviate_path
@@ -9,7 +10,6 @@ class TestAbbreviatePathShort:
assert abbreviate_path("/home/user/file.py") == "/home/user/file.py"
def test_exact_max_len_unchanged(self):
path = "/a/b/c" # 7 chars
assert abbreviate_path("/a/b/c", max_len=7) == "/a/b/c"
def test_basename_only(self):
+3 -3
View File
@@ -2,16 +2,16 @@
from __future__ import annotations
import pytest
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from nanobot.utils.helpers import build_status_content
from nanobot.utils.searchusage import (
SearchUsageInfo,
_parse_tavily_usage,
fetch_search_usage,
)
from nanobot.utils.helpers import build_status_content
# ---------------------------------------------------------------------------
# SearchUsageInfo.format() tests