Standardize formatting with black and apply ruff auto-fixes. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
19 lines
361 B
Python
19 lines
361 B
Python
from decimal import Decimal
|
|
|
|
from batters.models import bp_singles, wh_singles
|
|
|
|
|
|
def test_decimals():
|
|
assert Decimal(8) == 8
|
|
|
|
|
|
def test_bp_singles():
|
|
assert bp_singles(23) == 5
|
|
assert bp_singles(6) == 5
|
|
assert bp_singles(3) == 0
|
|
|
|
|
|
def test_wh_singles():
|
|
assert wh_singles(11, 0.36) == 3.75
|
|
assert wh_singles(12, 0.45) == Decimal("7.95")
|