Merge remote-tracking branch 'origin/main'
Some checks failed
Test Suite / test (3.11) (push) Failing after 1m2s
Test Suite / test (3.12) (push) Failing after 1m1s
Test Suite / test (3.13) (push) Failing after 59s

This commit is contained in:
Hua
2026-03-17 14:47:40 +08:00
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
from types import SimpleNamespace
from nanobot.providers.custom_provider import CustomProvider
def test_custom_provider_parse_handles_empty_choices() -> None:
provider = CustomProvider()
response = SimpleNamespace(choices=[])
result = provider._parse(response)
assert result.finish_reason == "error"
assert "empty choices" in result.content