a2075ba73e
Co-authored-by: Cursor <cursoragent@cursor.com>
17 lines
458 B
Python
17 lines
458 B
Python
"""按可用余额打满:min(余额, 单笔预算)."""
|
|
from __future__ import annotations
|
|
|
|
from lib.options.options_pricing_lib import resolve_budget_full_usdc
|
|
|
|
|
|
def test_balance_above_budget_uses_budget():
|
|
assert resolve_budget_full_usdc(100.0, 10.0) == 10.0
|
|
|
|
|
|
def test_balance_below_budget_uses_balance():
|
|
assert resolve_budget_full_usdc(5.0, 10.0) == 5.0
|
|
|
|
|
|
def test_balance_equals_budget():
|
|
assert resolve_budget_full_usdc(10.0, 10.0) == 10.0
|