• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Python test_utils.get_expected_path函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: test_convert

def test_convert(otf_filenames, ttc_filename, tables_msg):
    actual_path = get_temp_file_path()
    expected_path = get_expected_path(ttc_filename)
    stdout_path = runner(CMD + ['-s', '-o', 'o', '_{}'.format(actual_path),
                                '-f'] + otf_filenames)
    with open(stdout_path, 'rb') as f:
        output = f.read()
    assert tables_msg in output
    assert differ([expected_path, actual_path, '-m', 'bin'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:9,代码来源:otf2otc_test.py


示例17: test_cff2_no_vf_bug353

def test_cff2_no_vf_bug353():
    # read CFF2 WITHOUT VF info, write a CFF2 out. 'regular_CFF2.otf'
    # is derived by taking the regular.otf file from the sfntdiff
    # 'input_data' directory, and converting the CFF table to CFF2.
    font_path = get_input_path('regular_CFF2.otf')
    cff2_path = get_temp_file_path()
    runner(CMD + ['-a', '-o', 'cff2', '-f', font_path, cff2_path])
    expected_path = get_expected_path('regular_CFF2.cff2')
    assert differ([expected_path, cff2_path, '-m', 'bin'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:9,代码来源:tx_test.py


示例18: test_outline_from_processed_layer_bug703

def test_outline_from_processed_layer_bug703():
    input_filename = 'bug703.ufo'
    ttx_filename = 'bug703.ttx'
    actual_path = get_temp_file_path()
    runner(CMD + ['-o', 'f', '_{}'.format(get_input_path(input_filename)),
                        'o', '_{}'.format(actual_path)])
    actual_ttx = generate_ttx_dump(actual_path, ['CFF '])
    expected_ttx = get_expected_path(ttx_filename)
    assert differ([expected_ttx, actual_ttx, '-s', '<ttFont sfntVersion'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:9,代码来源:makeotf_test.py


示例19: test_missing_table_extract_bug160

def test_missing_table_extract_bug160():
    actual_path = get_temp_file_path()
    stderr_path = runner(CMD + ['-s', '-e', '-f', LIGHT, actual_path, '-o',
                                'x', '_xyz,head={}'.format(actual_path)])
    with open(stderr_path, 'rb') as f:
        output = f.read()
    assert b'[WARNING]: table missing (xyz )' in output
    expected_path = get_expected_path('head_light.tb')
    assert differ([expected_path, actual_path, '-m', 'bin'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:9,代码来源:sfntedit_test.py


示例20: test_contextual_multiple_substitutions_bug725

def test_contextual_multiple_substitutions_bug725():
    input_filename = "bug725/font.pfa"
    feat_filename = "bug725/feat.fea"
    actual_path = get_temp_file_path()
    ttx_filename = "bug725.ttx"
    runner(CMD + ['-o', 'f', '_{}'.format(get_input_path(input_filename)),
                        'ff', '_{}'.format(get_input_path(feat_filename)),
                        'o', '_{}'.format(actual_path)])
    actual_ttx = generate_ttx_dump(actual_path, ['GSUB'])
    expected_ttx = get_expected_path(ttx_filename)
    assert differ([expected_ttx, actual_ttx, '-s', '<ttFont sfntVersion'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:11,代码来源:makeotfexe_test.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python test_utils.get_input_path函数代码示例发布时间:2022-05-27
下一篇:
Python test_utils.eq_函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap