Пример #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)
Пример #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)
Пример #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))
Пример #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)
Пример #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))
Пример #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)
Пример #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)
Пример #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))
Пример #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)
Пример #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)
Пример #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)
Пример #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))
Пример #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))
Пример #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))
Пример #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']))
Пример #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))
Пример #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))
Пример #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))
Пример #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))
Пример #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))
Пример #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))
Пример #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)
Пример #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)
Пример #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))
Пример #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))
Пример #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']))
Пример #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']))
Пример #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))