コード例 #1
0
ファイル: test_visual_test.py プロジェクト: nkpydev/toolium
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)
コード例 #2
0
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)
コード例 #3
0
ファイル: test_visual_test.py プロジェクト: jframos/toolium
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)
コード例 #4
0
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)
コード例 #5
0
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)
コード例 #6
0
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)
コード例 #7
0
def test_diff_message_equal():
    message = None
    expected_message = ''
    assert expected_message == VisualTest._get_diff_message(message, 1000000)