Skip to content

Commit

Permalink
Print screenshot if test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
Conengmo committed Jun 13, 2020
1 parent f68b025 commit 4a2dbc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/selenium/test_heat_map_selenium.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ def test_heat_map_with_weights(driver):
path = os.path.dirname(__file__)
with open(os.path.join(path, 'test_heat_map_selenium_screenshot.png'), 'rb') as f:
screenshot_expected = f.read()
assert hash(screenshot) == hash(screenshot_expected)
if hash(screenshot) != hash(screenshot_expected):
print(screenshot)
assert False, 'screenshot is not as expected'

0 comments on commit 4a2dbc1

Please sign in to comment.