返回 DeepSeek-Reasonix
1 #!/usr/bin/env bash
2 set -e
3 export PYTHONPYCACHEPREFIX="$(mktemp -d)"
4 python3 - <<'PY'
5 from pricing import final_price
6 for args, want in [((100.0, 10, 5.0), 85.0), ((10.0, 0, 15.0), 0.0), ((20.0, 25, 2.5), 12.5)]:
7 got = final_price(*args)
8 assert abs(got - want) < 1e-9, (args, got, want)
9 PY
10
10 lines BASH