Example #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)
Example #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)
Example #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))
Example #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)
Example #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))
Example #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)
Example #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)
Example #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))
Example #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)
Example #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)
Example #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)
Example #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))
Example #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))
Example #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))
Example #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']))
Example #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))
Example #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))
Example #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))
Example #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))
Example #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))
Example #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))
Example #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)
Example #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)
Example #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))
Example #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))
Example #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']))
Example #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']))
Example #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))