Skip to content

Commit

Permalink
Generate baseline hashes during tests to reduce flakiness
Browse files Browse the repository at this point in the history
  • Loading branch information
ConorMacBride committed Nov 6, 2024
1 parent 29fd890 commit 17facab
Show file tree
Hide file tree
Showing 16 changed files with 45 additions and 418 deletions.
5 changes: 0 additions & 5 deletions tests/helpers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import sys
from pathlib import Path

import matplotlib
Expand All @@ -20,15 +19,11 @@ def skip_if_format_unsupported(file_format, using_hashes=False):
pytest.skip('SVG comparison is only supported in Matplotlib 3.3 and above')

if using_hashes:

if file_format == 'pdf' and MPL_VERSION < Version('2.1'):
pytest.skip('PDF hashes are only deterministic in Matplotlib 2.1 and above')
elif file_format == 'eps' and MPL_VERSION < Version('2.1'):
pytest.skip('EPS hashes are only deterministic in Matplotlib 2.1 and above')

if using_hashes and not sys.platform.startswith('linux'):
pytest.skip('Hashes for vector graphics are only provided in the hash library for Linux')

if file_format != 'png' and file_format not in converter:
if file_format == 'svg':
pytest.skip('Comparing SVG files requires inkscape to be installed')
Expand Down
34 changes: 0 additions & 34 deletions tests/subtests/result_hashes/mpl33_ft261.json

This file was deleted.

34 changes: 0 additions & 34 deletions tests/subtests/result_hashes/mpl34_ft261.json

This file was deleted.

34 changes: 0 additions & 34 deletions tests/subtests/result_hashes/mpl35_ft261.json

This file was deleted.

34 changes: 0 additions & 34 deletions tests/subtests/result_hashes/mpl36_ft261.json

This file was deleted.

Loading

0 comments on commit 17facab

Please sign in to comment.