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

Python test_utils.get_input_path函数代码示例

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

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



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

示例1: 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


示例2: test_feature_includes_type1_bug164

def test_feature_includes_type1_bug164(feat_filename):
    input_filename = "bug164/d1/d2/font.pfa"
    otf_path = get_temp_file_path()

    runner(CMD + ['-o',
                  'f', '_{}'.format(get_input_path(input_filename)),
                  'ff', '_{}'.format(get_input_path(feat_filename)),
                  'o', '_{}'.format(otf_path)])

    assert font_has_table(otf_path, 'head')
开发者ID:khaledhosny,项目名称:afdko,代码行数:10,代码来源:makeotf_test.py


示例3: 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


示例4: test_GDEF_LigatureCaret_bug155

def test_GDEF_LigatureCaret_bug155(caret_format):
    input_filename = 'bug155/font.pfa'
    feat_filename = 'bug155/caret-{}.fea'.format(caret_format)
    ttx_filename = 'bug155/caret-{}.ttx'.format(caret_format)
    actual_path = get_temp_file_path()
    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, ['GDEF'])
    expected_ttx = get_expected_path(ttx_filename)
    assert differ([expected_ttx, actual_ttx, '-l', '2'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:11,代码来源:makeotfexe_test.py


示例5: test_delete_zero_kb_font_on_fail_bug736

def test_delete_zero_kb_font_on_fail_bug736():
    input_filename = 'bug736/font.pfa'
    feat_filename = 'bug736/feat.fea'
    out_filename = 'bug736/SourceSans-Test.otf'

    with pytest.raises(subprocess.CalledProcessError) as err:
        runner(CMD + ['-o',
                      'f', '_{}'.format(get_input_path(input_filename)),
                      'ff', '_{}'.format(get_input_path(feat_filename))])
    assert err.value.returncode == 1
    assert os.path.exists(get_input_path(out_filename)) is False
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:11,代码来源:makeotf_test.py


示例6: test_useMarkFilteringSet_flag_bug196

def test_useMarkFilteringSet_flag_bug196():
    input_filename = "bug196/font.pfa"
    feat_filename = "bug196/feat.fea"
    actual_path = get_temp_file_path()
    ttx_filename = "bug196.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


示例7: test_useException_bug321

def test_useException_bug321():
    input_filename = "bug321/font.pfa"
    feat_filename = "bug321/feat.fea"
    actual_path = get_temp_file_path()
    ttx_filename = "bug321.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', 'GPOS'])
    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


示例8: test_mark_refer_diff_classes_bug416

def test_mark_refer_diff_classes_bug416():
    input_filename = "bug416/font.pfa"
    feat_filename = "bug416/feat.fea"
    actual_path = get_temp_file_path()
    ttx_filename = "bug416.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, ['GPOS'])
    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


示例9: test_add_table

def test_add_table():
    table_path = get_input_path('GDEF_italic.tb')
    font_path = get_input_path(ITALIC)
    actual_path = get_temp_file_path()
    assert font_has_table(font_path, 'GDEF') is False
    runner(CMD + ['-a', '-o', 'a', '_GDEF={}'.format(table_path),
                  '-f', font_path, actual_path])
    expected_path = get_expected_path('italic_w_GDEF.otf')
    assert differ([expected_path, actual_path, '-m', 'bin']) is False
    assert font_has_table(actual_path, 'GDEF')
    actual_ttx = generate_ttx_dump(actual_path)
    expected_ttx = generate_ttx_dump(expected_path)
    assert differ([expected_ttx, actual_ttx, '-s', '    <checkSumAdjustment'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:13,代码来源:sfntedit_test.py


示例10: test_warnings_bug635

def test_warnings_bug635():
    font1_path = get_input_path('bug635/cidfont.ps')
    font2_path = get_input_path('bug635/rotated.ps')
    actual_path = get_temp_file_path()
    expected_path = get_expected_path('bug635.txt')
    warnings_path = runner(
        CMD + ['-s', '-e', '-a', '-f', actual_path, font1_path, font2_path])
    # On Windows the messages start with 'mergefonts.exe:'
    with open(warnings_path, 'rb') as f:
        warnings = f.read().replace(b'mergefonts.exe:', b'mergefonts:')
    with open(warnings_path, 'wb') as f:
        f.write(warnings)
    assert differ([expected_path, warnings_path, '-l', '1,5-7,11-12'])
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:13,代码来源:mergefonts_test.py


示例11: test_parameter_offset_overflow_bug746

def test_parameter_offset_overflow_bug746():
    input_filename = 'bug746/font.pfa'
    feat_filename = 'bug746/feat.fea'
    otf_path = get_temp_file_path()

    stderr_path = runner(
        CMD + ['-s', '-e', '-o', 'shw',
               'f', '_{}'.format(get_input_path(input_filename)),
               'ff', '_{}'.format(get_input_path(feat_filename)),
               'o', '_{}'.format(otf_path)])

    with open(stderr_path, 'rb') as f:
        output = f.read()
    assert(b"[FATAL] <bug746> feature parameter offset too large") in output
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:14,代码来源:makeotfexe_test.py


示例12: test_ttf_input_font_bug680

def test_ttf_input_font_bug680():
    input_filename = 'bug680/font.ttf'
    feat_filename = 'bug680/features.fea'
    ttf_path = get_temp_file_path()

    runner(CMD + ['-o', 'r',
                  'f', '_{}'.format(get_input_path(input_filename)),
                  'ff', '_{}'.format(get_input_path(feat_filename)),
                  'o', '_{}'.format(ttf_path)])

    for table_tag in ('head', 'hhea', 'maxp', 'OS/2', 'hmtx', 'cmap', 'fpgm',
                      'prep', 'cvt ', 'loca', 'glyf', 'name', 'post', 'gasp',
                      'BASE', 'GDEF', 'GPOS', 'GSUB'):
        assert font_has_table(ttf_path, table_tag)
开发者ID:khaledhosny,项目名称:afdko,代码行数:14,代码来源:makeotf_test.py


示例13: test_overflow_report_bug313

def test_overflow_report_bug313(feat_name, error_msg):
    input_filename = 'bug313/font.pfa'
    feat_filename = 'bug313/{}.fea'.format(feat_name)
    otf_path = get_temp_file_path()

    stderr_path = runner(
        CMD + ['-s', '-e', '-o', 'shw',
               'f', '_{}'.format(get_input_path(input_filename)),
               'ff', '_{}'.format(get_input_path(feat_filename)),
               'o', '_{}'.format(otf_path)])

    with open(stderr_path, 'rb') as f:
        output = f.read()
    assert error_msg in output
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:14,代码来源:makeotfexe_test.py


示例14: test_input_formats

def test_input_formats(arg, input_filename, ttx_filename):
    if 'gf' in arg:
        arg.append('_{}'.format(get_input_path('GOADB.txt')))
    actual_path = get_temp_file_path()
    runner(CMD + ['-o', 'f', '_{}'.format(get_input_path(input_filename)),
                        'o', '_{}'.format(actual_path)] + arg)
    actual_ttx = generate_ttx_dump(actual_path)
    expected_ttx = get_expected_path(ttx_filename)
    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:khaledhosny,项目名称:afdko,代码行数:15,代码来源:makeotf_test.py


示例15: test_feature_recursion_bug628

def test_feature_recursion_bug628():
    input_filename = 'bug628/font.pfa'
    feat_filename = 'bug628/feat.fea'
    otf_path = get_temp_file_path()

    stderr_path = runner(
        CMD + ['-s', '-e', '-o', 'shw',
               'f', '_{}'.format(get_input_path(input_filename)),
               'ff', '_{}'.format(get_input_path(feat_filename)),
               'o', '_{}'.format(otf_path)])

    with open(stderr_path, 'rb') as f:
        output = f.read()
    assert(b"[FATAL] <SourceSans-Test> Can't include [feat.fea]; maximum "
           b"include levels <50> reached") in output
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:15,代码来源:makeotfexe_test.py


示例16: test_overflow_bug731

def test_overflow_bug731():
    input_filename = 'bug731/font.pfa'
    feat_filename = 'bug731/feat.fea'
    otf_path = get_temp_file_path()

    stderr_path = runner(
        CMD + ['-s', '-e', '-o', 'shw',
               'f', '_{}'.format(get_input_path(input_filename)),
               'ff', '_{}'.format(get_input_path(feat_filename)),
               'o', '_{}'.format(otf_path)])

    with open(stderr_path, 'rb') as f:
        output = f.read()
    assert(b"[FATAL] <SourceSans-Test> subtable offset too large (1003c) in "
           b"lookup 0 type 3") in output
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:15,代码来源:makeotfexe_test.py


示例17: test_version_warning_bug610

def test_version_warning_bug610():
    input_filename = 'bug610/font.pfa'
    feat_filename = 'bug610/v0005.fea'
    otf_path = get_temp_file_path()

    stderr_path = runner(
        CMD + ['-s', '-e', '-o',
               'f', '_{}'.format(get_input_path(input_filename)),
               'ff', '_{}'.format(get_input_path(feat_filename)),
               'o', '_{}'.format(otf_path)])

    with open(stderr_path, 'rb') as f:
        output = f.read()
    assert (b"[WARNING] <SourceSans-Test> Major version number not in "
            b"range 1 .. 255") not in output
开发者ID:adobe-type-tools,项目名称:afdko,代码行数:15,代码来源:makeotfexe_test.py


示例18: 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


示例19: 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


示例20: 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



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Python test_utils.get_temp_file_path函数代码示例发布时间:2022-05-27
下一篇:
Python test_utils.get_expected_path函数代码示例发布时间: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