File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -776,8 +776,13 @@ mod tests {
776
776
)
777
777
. and_then ( |lr| lr. predict ( & x) )
778
778
. unwrap ( ) ;
779
+ let acc = accuracy ( & y_hat, & y) ;
779
780
780
- assert ! ( accuracy( & y_hat, & y) >= 0.9 ) ;
781
+ assert ! (
782
+ acc >= 0.9 ,
783
+ "accuracy ({}) is not larger or equal to 0.9" ,
784
+ acc
785
+ ) ;
781
786
}
782
787
783
788
#[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test:: wasm_bindgen_test) ]
@@ -860,7 +865,13 @@ mod tests {
860
865
. and_then ( |lr| lr. predict ( & x) )
861
866
. unwrap ( ) ;
862
867
863
- assert ! ( accuracy( & y_hat, & y) >= 0.9 ) ;
868
+ let acc = accuracy ( & y_hat, & y) ;
869
+
870
+ assert ! (
871
+ acc >= 0.9 ,
872
+ "accuracy ({}) is not larger or equal to 0.9" ,
873
+ acc
874
+ ) ;
864
875
}
865
876
866
877
#[ cfg_attr( target_arch = "wasm32" , wasm_bindgen_test:: wasm_bindgen_test) ]
You can’t perform that action at this time.
0 commit comments