Exemplo n.º 1
0
def test_failing_compile_practice_data():
    practice_path_7 = os.path.join(MOCK_DATA_DIR, 'practice', '7.csv')
    df = compile_data.get_csv_as_dataframe(practice_path_7)
    data = compile_data.compile_practice_data(df)
    assert data['id'] == 7
    assert data['passed_practice'] == False
    assert data['time_practice_ms'] == 334489
Exemplo n.º 2
0
def test_passing_compile_practice_data():
    df = compile_data.get_csv_as_dataframe(PRACTICE_PATH_1)
    data = compile_data.compile_practice_data(df)
    assert data['id'] == 1
    assert data['passed_practice'] == True
    assert data['time_practice_blk1_ms'] == 33045
    assert data['time_practice_blk2_ms'] == 83144
    assert data['time_practice_ms'] == 151671
Exemplo n.º 3
0
def test_passing_compile_practice_data():
    df = get_csv_as_df('practice', '003')
    data = compile_data.compile_practice_data(df)
    assert data['id'] == "003"
    assert data['practice_condition'] == 'num_trials'
    assert data['num_practice_blk2s'] == 1
    assert data['passed_practice'] == True
    assert data['time_practice_blk1_ms'] == 6030
    assert data['time_practice_blk2_1_ms'] == 16165
    assert data['time_practice_ms'] == 67198
Exemplo n.º 4
0
def test_failing_compile_practice_data():
    pid = "fail1"
    df = get_csv_as_df('practice', pid)
    data = compile_data.compile_practice_data(df)
    assert data['id'] == pid
    assert data['practice_condition'] == 'time_duration'
    assert data['num_practice_blk2s'] == 3
    assert data['passed_practice'] == False
    assert data['time_practice_blk1_ms'] == 42198
    assert data['time_practice_blk2_1_ms'] == 120397
    assert data['time_practice_blk2_2_ms'] == 140798
    assert data['time_practice_blk2_3_ms'] == 125869

    # baseline evaluation of valence and arousal
    assert data['arousal_baseline_mind_body'] == '2'
    assert data['arousal_baseline_feeling'] == '6'

    assert data['time_practice_ms'] == 469892