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


Python VisualTest._get_diff_message方法代码示例

本文整理汇总了Python中toolium.visual_test.VisualTest._get_diff_message方法的典型用法代码示例。如果您正苦于以下问题:Python VisualTest._get_diff_message方法的具体用法?Python VisualTest._get_diff_message怎么用?Python VisualTest._get_diff_message使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在toolium.visual_test.VisualTest的用法示例。


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

示例1: test_diff_message_diff_perceptualdiff

# 需要导入模块: from toolium.visual_test import VisualTest [as 别名]
# 或者: from toolium.visual_test.VisualTest import _get_diff_message [as 别名]
def test_diff_message_diff_perceptualdiff():
    message = "The new screenshot 'C:\\...\\01_login_form__test_login.png' did not match the baseline "
    message += """'C:\\...\\login_form.png' (See C:\\...\\01_login_form__test_login.diff.png):
        FAIL: Images are visibly different
        15040 pixels are different
    """
    expected_message = 'Distance of 0.01504000'
    assert expected_message == VisualTest._get_diff_message(message, 1000000)
开发者ID:jframos,项目名称:toolium,代码行数:10,代码来源:test_visual_test.py

示例2: test_diff_message_diff_imagemagick

# 需要导入模块: from toolium.visual_test import VisualTest [as 别名]
# 或者: from toolium.visual_test.VisualTest import _get_diff_message [as 别名]
def test_diff_message_diff_imagemagick():
    message = ("The new screenshot 'C:\\...\\01_login_form__test_login.png' did not match the baseline "
               "'C:\\...\\login_form.png' (See C:\\...\\01_login_form__test_login.diff.png):\n"
               "5443.77 (0.0830666) @ 0,0")
    expected_message = 'Distance of 0.08306660'
    assert expected_message == VisualTest._get_diff_message(message, 1000000)
开发者ID:jframos,项目名称:toolium,代码行数:8,代码来源:test_visual_test.py

示例3: test_diff_message_diff_pil

# 需要导入模块: from toolium.visual_test import VisualTest [as 别名]
# 或者: from toolium.visual_test.VisualTest import _get_diff_message [as 别名]
def test_diff_message_diff_pil():
    message = ("The new screenshot 'C:\\...\\01_login_form__test_login.png' did not match the baseline "
               "'C:\\...\\login_form.png' (by a distance of 14794.11)")
    expected_message = 'Distance of 0.01479411'
    assert expected_message == VisualTest._get_diff_message(message, 1000000)
开发者ID:jframos,项目名称:toolium,代码行数:7,代码来源:test_visual_test.py

示例4: test_diff_message_size_imagemagick

# 需要导入模块: from toolium.visual_test import VisualTest [as 别名]
# 或者: from toolium.visual_test.VisualTest import _get_diff_message [as 别名]
def test_diff_message_size_imagemagick():
    message = 'Image dimensions do not match'
    expected_message = 'Image dimensions do not match'
    assert expected_message == VisualTest._get_diff_message(message, 1000000)
开发者ID:jframos,项目名称:toolium,代码行数:6,代码来源:test_visual_test.py

示例5: test_diff_message_size_perceptualdiff

# 需要导入模块: from toolium.visual_test import VisualTest [as 别名]
# 或者: from toolium.visual_test.VisualTest import _get_diff_message [as 别名]
def test_diff_message_size_perceptualdiff():
    message = """The new screenshot 'C:\\...\\01_login_form__test_login.png' did not match the baseline 'C:\\...\\login_form.png':
        FAIL: Image dimensions do not match"""
    expected_message = 'Image dimensions do not match'
    assert expected_message == VisualTest._get_diff_message(message, 1000000)
开发者ID:jframos,项目名称:toolium,代码行数:7,代码来源:test_visual_test.py

示例6: test_diff_message_equal

# 需要导入模块: from toolium.visual_test import VisualTest [as 别名]
# 或者: from toolium.visual_test.VisualTest import _get_diff_message [as 别名]
def test_diff_message_equal():
    message = None
    expected_message = ''
    assert expected_message == VisualTest._get_diff_message(message, 1000000)
开发者ID:jframos,项目名称:toolium,代码行数:6,代码来源:test_visual_test.py


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