Esempio n. 1
0
def test_determine_chosen_sections_invalid_special():
    general_sections = ['all']
    special_sections = ['placeholder_special_section', 'foobar']
    custom_sections = []
    subgroups = ['prompt']
    _ = determine_chosen_sections(general_sections, special_sections,
                                  custom_sections, subgroups)
Esempio n. 2
0
def test_determine_chosen_sections_no_subgroups():
    general_sections = ['data_description', 'data_description_by_group']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections, subgroups)
    eq_(chosen_sections, general_section_list_rsmtool)
Esempio n. 3
0
def test_determine_chosen_sections_custom_general_with_special():
    general_sections = ['data_description', 'evaluation']
    special_sections = ['placeholder_special_section']
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections, subgroups)
    eq_(sorted(chosen_sections), sorted(general_sections + special_sections))
Esempio n. 4
0
def test_determine_chosen_sections_invalid_special():
    general_sections = ['all']
    special_sections = ['placeholder_special_section', 'foobar']
    custom_sections = []
    subgroups = ['prompt']
    _ = determine_chosen_sections(general_sections,
                                  special_sections,
                                  custom_sections,
                                  subgroups)
Esempio n. 5
0
def test_determine_chosen_sections_default_general_with_subgroups():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections, subgroups)
    eq_(sorted(chosen_sections), sorted(general_section_list_rsmtool))
Esempio n. 6
0
def test_determine_chosen_sections_invalid_general():
    general_sections = ['data_description', 'foobar']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections, subgroups)
    eq_(chosen_sections, general_section_list_rsmtool)
Esempio n. 7
0
def test_determine_chosen_sections_default_general():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = ['prompt']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections, subgroups)
    eq_(chosen_sections, general_section_list_rsmtool)
Esempio n. 8
0
def test_determine_chosen_sections_custom_general():
    general_sections = ['data_description', 'evaluation']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups)
    eq_(sorted(chosen_sections), sorted(general_sections))
Esempio n. 9
0
def test_determine_chosen_sections_no_subgroups():
    general_sections = ['data_description', 'data_description_by_group']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups)
    eq_(chosen_sections, general_section_list_rsmtool)
Esempio n. 10
0
def test_determine_chosen_sections_invalid_general():
    general_sections = ['data_description', 'foobar']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups)
    eq_(chosen_sections, general_section_list_rsmtool)
Esempio n. 11
0
def test_determine_chosen_sections_default_general():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = ['prompt']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups)
    eq_(chosen_sections, general_section_list_rsmtool)
Esempio n. 12
0
def test_determine_chosen_sections_compare_default_general():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = ['prompt']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmcompare')
    eq_(sorted(chosen_sections), sorted(general_section_list_rsmcompare))
Esempio n. 13
0
def test_determine_chosen_sections_eval_custom_general():
    general_sections = ['data_description', 'consistency']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmeval')
    eq_(sorted(chosen_sections), sorted(general_sections))
Esempio n. 14
0
def test_determine_chosen_sections_default_general_with_subgroups():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups)
    eq_(sorted(chosen_sections),
        sorted(general_section_list_rsmtool))
Esempio n. 15
0
def test_determine_chosen_sections_custom_general_with_special_subgroups_and_custom(
):
    general_sections = ['evaluation', 'sysinfo', 'evaluation_by_group']
    special_sections = ['placeholder_special_section']
    custom_sections = ['foobar.ipynb']
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections, subgroups)
    eq_(sorted(chosen_sections),
        sorted(general_sections + special_sections + ['foobar']))
Esempio n. 16
0
def test_determine_chosen_sections_eval_custom_general():
    general_sections = ['data_description', 'consistency']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmeval')
    eq_(sorted(chosen_sections), sorted(general_sections))
Esempio n. 17
0
def test_determine_chosen_sections_rsmcompare_custom_general():
    general_sections = ['feature_descriptives', 'evaluation']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmcompare')
    eq_(sorted(chosen_sections), sorted(general_sections))
Esempio n. 18
0
def test_determine_chosen_sections_compare_default_general():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = ['prompt']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmcompare')
    eq_(sorted(chosen_sections), sorted(general_section_list_rsmcompare))
Esempio n. 19
0
def test_determine_chosen_sections_rsmcompare_custom_general_with_special_and_subgroups(
):
    general_sections = ['feature_descriptives', 'evaluation']
    special_sections = ['placeholder_special_section']
    custom_sections = []
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmcompare')
    eq_(sorted(chosen_sections), sorted(general_sections + special_sections))
Esempio n. 20
0
def test_determine_chosen_sections_rsmcompare_custom_general():
    general_sections = ['feature_descriptives',
                        'evaluation']
    special_sections = []
    custom_sections = []
    subgroups = []
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmcompare')
    eq_(sorted(chosen_sections), sorted(general_sections))
Esempio n. 21
0
def test_determine_chosen_sections_eval_custom_general_with_special_and_subgroups():
    general_sections = ['data_description', 'consistency', 'data_description_by_group']
    special_sections = ['placeholder_special_section']
    custom_sections = []
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmeval')
    eq_(sorted(chosen_sections), sorted(general_sections +
                                        special_sections))
Esempio n. 22
0
def test_determine_chosen_sections_default_general_no_subgroups():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = []
    no_subgroup_list = [
        s for s in general_section_list_rsmtool if not s.endswith('by_group')
    ]
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections, subgroups)
    eq_(chosen_sections, no_subgroup_list)
Esempio n. 23
0
def test_determine_chosen_sections_default_general_no_subgroups():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = []
    no_subgroup_list = [s for s in general_section_list_rsmtool
                        if not s.endswith('by_group')]
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups)
    eq_(chosen_sections, no_subgroup_list)
Esempio n. 24
0
def test_determine_chosen_sections_eval_default_general_with_no_subgroups():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = []
    no_subgroup_list = [s for s in general_section_list_rsmeval
                        if not s.endswith('by_group')]
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmeval')
    eq_(sorted(chosen_sections), sorted(no_subgroup_list))
Esempio n. 25
0
def test_determine_chosen_sections_rsmcompare_custom_general_with_special_and_subgroups():
    general_sections = ['feature_descriptives',
                        'evaluation']
    special_sections = ['placeholder_special_section']
    custom_sections = []
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmcompare')
    eq_(sorted(chosen_sections), sorted(general_sections +
                                        special_sections))
Esempio n. 26
0
def test_determine_chosen_sections_eval_custom_general_with_special_subgroups_and_custom(
):
    general_sections = ['data_description', 'consistency']
    special_sections = ['placeholder_special_section']
    custom_sections = ['foobar.ipynb']
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmeval')
    eq_(sorted(chosen_sections),
        sorted(general_sections + special_sections + ['foobar']))
Esempio n. 27
0
def test_determine_chosen_sections_custom_general_with_special_subgroups_and_custom():
    general_sections = ['evaluation', 'sysinfo', 'evaluation_by_group']
    special_sections = ['placeholder_special_section']
    custom_sections = ['foobar.ipynb']
    subgroups = ['prompt', 'gender']
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups)
    eq_(sorted(chosen_sections),
        sorted(general_sections +
               special_sections +
               ['foobar']))
Esempio n. 28
0
def test_determine_chosen_sections_eval_default_general_with_no_subgroups():
    general_sections = ['all']
    special_sections = []
    custom_sections = []
    subgroups = []
    no_subgroup_list = [
        s for s in general_section_list_rsmeval if not s.endswith('by_group')
    ]
    chosen_sections = determine_chosen_sections(general_sections,
                                                special_sections,
                                                custom_sections,
                                                subgroups,
                                                context='rsmeval')
    eq_(sorted(chosen_sections), sorted(no_subgroup_list))