当前位置: 首页>>代码示例>>Python>>正文


Python test_utils.get_expected_path函数代码示例

本文整理汇总了Python中test_utils.get_expected_path函数的典型用法代码示例。如果您正苦于以下问题:Python get_expected_path函数的具体用法?Python get_expected_path怎么用?Python get_expected_path使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了get_expected_path函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_start_point_not_oncurve_bug715

def test_start_point_not_oncurve_bug715():
    filename = 'bug715'
    report_path = get_temp_file_path()
    actual_hstm_path = '{}.hstm.txt'.format(report_path)
    actual_vstm_path = '{}.vstm.txt'.format(report_path)
    expect_hstm_path = get_expected_path('{}.hstm.txt'.format(filename))
    expect_vstm_path = get_expected_path('{}.vstm.txt'.format(filename))

    runner(CMD + ['-f', '{}.ufo'.format(filename),
                  '-o', 'all', 'o', '_{}'.format(report_path)])

    assert differ([expect_hstm_path, actual_hstm_path, '-l', '1'])
    assert differ([expect_vstm_path, actual_vstm_path, '-l', '1'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:13,代码来源:stemhist_test.py

示例2: test_cross_environment_results_bug210

def test_cross_environment_results_bug210():
    filename = 'bug210'
    report_path = get_temp_file_path()
    actual_top_path = '{}.top.txt'.format(report_path)
    actual_bot_path = '{}.bot.txt'.format(report_path)
    expect_top_path = get_expected_path('{}.top.txt'.format(filename))
    expect_bot_path = get_expected_path('{}.bot.txt'.format(filename))

    runner(CMD + ['-f', '{}.ufo'.format(filename),
                  '-o', 'a', 'g', '_a-z,A-Z,zero-nine',
                  'o', '_{}'.format(report_path)])

    assert differ([expect_top_path, actual_top_path, '-l', '1'])
    assert differ([expect_bot_path, actual_bot_path, '-l', '1'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:14,代码来源:stemhist_test.py

示例3: test_build_options_cs_cl_bug459

def test_build_options_cs_cl_bug459(args, input_filename, ttx_filename):
    actual_path = get_temp_file_path()
    runner(CMD + ['-o', 'f', '_{}'.format(get_input_path(input_filename)),
                        'o', '_{}'.format(actual_path)] + args)
    actual_ttx = generate_ttx_dump(actual_path, ['cmap'])
    expected_ttx = get_expected_path(ttx_filename)
    assert differ([expected_ttx, actual_ttx, '-s', '<ttFont sfntVersion'])
开发者ID:khaledhosny,项目名称:afdko,代码行数:7,代码来源:makeotf_test.py

示例4: test_cff2_extract

def test_cff2_extract(args, exp_filename):
    # read CFF2 VF, write CFF2 table
    font_path = get_input_path('SourceCodeVariable-Roman.otf')
    cff2_path = get_temp_file_path()
    runner(CMD + ['-a', '-f', font_path, cff2_path, '-o', 'cff2'] + args)
    expected_path = get_expected_path(exp_filename)
    assert differ([expected_path, cff2_path, '-m', 'bin'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:7,代码来源:tx_test.py

示例5: test_recalculate_font_bbox_bug618

def test_recalculate_font_bbox_bug618(to_format, args, exp_filename):
    font_path = get_input_path('bug618.pfa')
    save_path = get_temp_file_path()

    runner(CMD + ['-f', font_path, save_path, '-o', to_format] + args)

    file_ext = to_format
    if to_format == 't1':
        file_ext = 'pfa'
    elif to_format == 'afm':
        file_ext = 'txt'

    expected_path = get_expected_path(
        'bug618/{}.{}'.format(exp_filename, file_ext))

    diff_mode = []
    if to_format == 'cff':
        diff_mode = ['-m', 'bin']

    skip = []
    if to_format == 'afm':
        skip = ['-s', 'Comment Creation Date:' + SPLIT_MARKER +
                'Comment Copyright']

    assert differ([expected_path, save_path] + diff_mode + skip)
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:25,代码来源:tx_test.py

示例6: test_st28_basic_cmap

def test_st28_basic_cmap():
    input_dir = get_input_path('basic_cmap')
    expected_path = get_expected_path('st28_basic_cmap.txt')
    log_path = get_temp_file_path()
    runner(CMD + ['-o', 'st', '_28', 'd', '_{}'.format(input_dir),
                  'l', '_{}'.format(log_path)])
    assert differ([expected_path, log_path, '-l', '1'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:7,代码来源:comparefamily_test.py

示例7: test_report2

def test_report2():
    input_dir = get_input_path('font-family')
    expected_path = get_expected_path('font-family.txt')
    log_path = get_temp_file_path()
    runner(CMD + ['-o', 'd', '_{}'.format(input_dir),
                  'rm', 'rn', 'rp', 'l', '_{}'.format(log_path)])
    assert differ([expected_path, log_path, '-l', '1'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:7,代码来源:comparefamily_test.py

示例8: test_remove_overlap

def test_remove_overlap(args, ufo_filename, expct_label):
    actual_path = os.path.join(tempfile.mkdtemp(), ufo_filename)
    copytree(get_input_path(ufo_filename), actual_path)
    runner(CMD + ['-f', actual_path, '-o'] + args)
    expct_filename = '{}-{}'.format(ufo_filename[:-4], expct_label)
    expected_path = get_expected_path(expct_filename)
    assert differ([expected_path, actual_path])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:7,代码来源:checkoutlinesufo_test.py

示例9: test_run_cli_with_output_path

def test_run_cli_with_output_path():
    actual_path = get_temp_file_path()
    runner(CMD + ['-o', 'o', '_{}'.format(actual_path),
                  '_{}'.format(get_input_path(TEST_TTF_FILENAME))])
    actual_ttx = generate_ttx_dump(actual_path, ['maxp', 'glyf'])
    expected_ttx = get_expected_path('ttfcomponentizer.ttx')
    assert differ([expected_ttx, actual_ttx, '-s', '<ttFont sfntVersion'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:7,代码来源:ttfcomponentizer_test.py

示例10: test_diff

def test_diff(args, txt_filename):
    if args:
        args.insert(0, '-o')
    actual_path = runner(
        ['-t', TOOL, '-s', '-f', 'regular.otf', 'bold.otf'] + args)
    expected_path = get_expected_path(txt_filename)
    assert differ([expected_path, actual_path, '-l', '1-4'])
开发者ID:khaledhosny,项目名称:afdko,代码行数:7,代码来源:sfntdiff_test.py

示例11: test_cjk_var

def test_cjk_var():
    """
    Builds all OTFs for the 'CJKVar' project and then diffs two of them.
    """
    input_dir = get_input_path('CJKVar')
    temp_dir = os.path.join(tempfile.mkdtemp(), 'CJKVar')
    copytree(input_dir, temp_dir)
    ds_path = os.path.join(temp_dir, 'CJKVar.designspace')
    runner(CMD + ['-o', '_{}'.format(ds_path)])

    otf1_path = os.path.join(
        temp_dir, 'Normal', 'Master_8', 'MasterSet_Kanji-w600.00.otf')
    otf2_path = os.path.join(
        temp_dir, 'Condensed', 'Master_8', 'MasterSet_Kanji_75-w600.00.otf')

    for otf_path in (otf1_path, otf2_path):
        actual_ttx = generate_ttx_dump(otf_path)
        expected_ttx = get_expected_path(
            os.path.basename(otf_path)[:-3] + 'ttx')
        assert differ([expected_ttx, actual_ttx,
                       '-s',
                       '<ttFont sfntVersion' + SPLIT_MARKER +
                       '    <checkSumAdjustment value=' + SPLIT_MARKER +
                       '    <created value=' + SPLIT_MARKER +
                       '    <modified value=',
                       '-r', r'^\s+Version.*;hotconv.*;makeotfexe'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:26,代码来源:buildmasterotfs_test.py

示例12: test_report

def test_report(font_family, font_format):
    input_dir = os.path.join(get_input_path(font_family), font_format)
    log_path = get_temp_file_path()
    runner(CMD + ['-o', 'd', '_{}'.format(input_dir), 'tolerance', '_3',
                  'rm', 'rn', 'rp', 'l', '_{}'.format(log_path)])
    expected_path = get_expected_path('{}_{}.txt'.format(
                                      font_family, font_format))
    assert differ([expected_path, log_path, '-l', '1'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:8,代码来源:comparefamily_test.py

示例13: test_linux_ci_failure_bug570

def test_linux_ci_failure_bug570():
    table_path = get_input_path('1_fdict.cff')
    font_path = get_input_path('core.otf')
    actual_path = get_temp_file_path()
    runner(CMD + ['-a', '-o', 'a', '_CFF={}'.format(table_path),
                  '-f', font_path, actual_path])
    expected_path = get_expected_path('1_fdict.otf')
    assert differ([expected_path, actual_path, '-m', 'bin'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:8,代码来源:sfntedit_test.py

示例14: test_beztools_hhint_over_limit_bug629

def test_beztools_hhint_over_limit_bug629():
    test_filename = 'bug629.pfa'
    actual_path = get_temp_file_path()
    expected_path = get_expected_path(test_filename)
    runner(CMD + ['-o', 'nb', 'o', '_{}'.format(actual_path),
                  '-f', test_filename])
    assert differ([expected_path, actual_path,
                   '-s', r'%%Copyright: Copyright'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:8,代码来源:autohint_test.py

示例15: test_cff2_sub_dump

def test_cff2_sub_dump():
    # Dump a subroutinized CFF2 font. This is a J font with 64K glyphs,
    # and almost every subr and charstring is a single subr call.
    # A good test for problems with charstrings with no endchar operator.
    actual_path = runner(CMD + ['-s', '-o', 'dump', '6', 'g', '_21847',
                                '-f', 'CFF2-serif-sub.cff2'])
    expected_path = get_expected_path('CFF2-serif-sub.cff2.txt')
    assert differ([expected_path, actual_path])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:8,代码来源:tx_test.py


注:本文中的test_utils.get_expected_path函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。