You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

11 lines
698 B

from src.statistical_tests import compare_numeric,compare_response_counts
def test_response_auto_fisher_and_rates() -> None:
r=compare_response_counts(1,3,0,3,"auto");assert r.test_name=="fisher" and r.rate_difference==1/3
def test_response_auto_chi_and_phi() -> None:
r=compare_response_counts(30,50,15,50,"auto");assert r.test_name=="chi_square" and r.p_value is not None and r.effect_size_name=="phi"
def test_numeric_and_empty() -> None:
r=compare_numeric([1.,2.,3.],[3.,4.,5.],"reaction_time_sec");assert r.prompt_count==3 and r.effect_size_name=="rank_biserial"
assert compare_numeric([],[],"yaw").p_value is None
assert compare_response_counts(0,0,0,0).p_value is None