8000 Perceptual hash by bjlittle · Pull Request #150 · matplotlib/pytest-mpl · GitHub
[go: up one dir, main page]

Skip to content

Perceptual hash #150

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 20 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix test_pytest_mpl.py
  • Loading branch information
bjlittle committed May 19, 2022
commit 80bc924fbdb19eeaedbc32e3fbb54d787ac27b85
5 changes: 3 additions & 2 deletions tests/test_pytest_mpl.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,13 +289,14 @@ def test_hash_fails(tmpdir):
f.write(TEST_FAILING_HASH)

# If we use --mpl, it should detect that the figure is wrong
output = assert_pytest_fails_with(['--mpl', test_file], "doesn't match hash FAIL in library")
expected = "does not match baseline hash 'FAIL' in library"
output = assert_pytest_fails_with(['--mpl', test_file], expected)
# We didn't specify a baseline dir so we shouldn't attempt to find one
assert "Image file not found for comparison test" not in output, output

# Check that the summary path is printed and that it exists.
output = assert_pytest_fails_with(['--mpl', test_file, '--mpl-generate-summary=html'],
"doesn't match hash FAIL in library")
expected)
# We didn't specify a baseline dir so we shouldn't attempt to find one
print_message = "A summary of test results can be found at:"
assert print_message in output, output
Expand Down
0