mirror of
https://github.com/langbot-app/LangBot.git
synced 2026-07-22 04:16:07 +00:00
test(provider): align empty token rotation expectation
This commit is contained in:
@@ -223,11 +223,10 @@ def test_token_manager_next_token_empty():
|
|||||||
"""Test TokenManager.next_token with empty tokens doesn't error."""
|
"""Test TokenManager.next_token with empty tokens doesn't error."""
|
||||||
mgr = token.TokenManager(name='test', tokens=[])
|
mgr = token.TokenManager(name='test', tokens=[])
|
||||||
|
|
||||||
# Should not error, but behavior is modulo 0
|
mgr.next_token()
|
||||||
# Actually this would cause ZeroDivisionError if next_token is called
|
|
||||||
# Let's check if it handles empty case
|
assert mgr.get_token() == ''
|
||||||
with pytest.raises(ZeroDivisionError):
|
assert mgr.using_token_index == 0
|
||||||
mgr.next_token()
|
|
||||||
|
|
||||||
|
|
||||||
# ============================================================================
|
# ============================================================================
|
||||||
@@ -633,4 +632,4 @@ def test_llm_model_info_optional_fields():
|
|||||||
|
|
||||||
assert info.model_name is None
|
assert info.model_name is None
|
||||||
assert info.tool_call_supported == False # default
|
assert info.tool_call_supported == False # default
|
||||||
assert info.vision_supported == False # default
|
assert info.vision_supported == False # default
|
||||||
|
|||||||
Reference in New Issue
Block a user