test(provider): align empty token rotation expectation

This commit is contained in:
huanghuoguoguo
2026-05-16 10:45:14 +08:00
parent 29a0041887
commit ca74fc1ba4
@@ -223,12 +223,11 @@ 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
# Actually this would cause ZeroDivisionError if next_token is called
# Let's check if it handles empty case
with pytest.raises(ZeroDivisionError):
mgr.next_token() mgr.next_token()
assert mgr.get_token() == ''
assert mgr.using_token_index == 0
# ============================================================================ # ============================================================================
# RuntimeProvider Tests # RuntimeProvider Tests