本文整理汇总了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)
示例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)
示例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)
示例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)
示例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)
示例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)