コード例 #1
0
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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
ファイル: test_report.py プロジェクト: WeilamChung/rsmtool
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))