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
1023 B

from pathlib import Path
import pytest
pd=pytest.importorskip("pandas");pytest.importorskip("matplotlib")
from src.analysis_plots import AnalysisPlots
from src.config_loader import AnalysisSettings
from src.statistical_analyzer import StatisticalAnalyzer
def test_five_plots(tmp_path:Path)->None:
c=AnalysisSettings(True,"in",str(tmp_path),True,True,True,True,"weak","auto","mannwhitney","valid_turn_analysis",True,True,.05)
df=pd.DataFrame([{"prompt_condition":"prompt","valid_for_voice_analysis":True,"response_detected":True,"reaction_time_sec":1.,"max_yaw_delta_toward_signage":20.,"turn_level":"weak","excluded":False,"valid_for_turn_analysis":True,"exclusion_reason":"none"},{"prompt_condition":"control","valid_for_voice_analysis":True,"response_detected":False,"reaction_time_sec":None,"max_yaw_delta_toward_signage":5.,"turn_level":"none","excluded":False,"valid_for_turn_analysis":True,"exclusion_reason":"none"}])
assert len(AnalysisPlots(c).generate(df,StatisticalAnalyzer(c).run_analysis(df)))==5