mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-08 03:10:26 +00:00
test(server): avoid float equality in usage scenario
Use a tolerance-based runtime assertion so workspace clippy can run with float_cmp denied.
This commit is contained in:
parent
f3f0fa0e80
commit
36c686b828
1 changed files with 4 additions and 1 deletions
|
|
@ -150,5 +150,8 @@ fn assert_non_llm_billing(billing: &serde_json::Value, expected_stage_ids: &[&st
|
|||
let total_runtime_secs = billing["totals"]["runtime_secs"]
|
||||
.as_f64()
|
||||
.expect("totals should include runtime_secs");
|
||||
assert_eq!(total_runtime_secs, runtime_secs);
|
||||
assert!(
|
||||
(total_runtime_secs - runtime_secs).abs() < f64::EPSILON,
|
||||
"total runtime {total_runtime_secs} should equal summed stage runtime {runtime_secs}"
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue