Skip to content

test_gaussian fails for fedora rawhide #256

@jdkloe

Description

@jdkloe

For fedora-rawhide (to be fedora-41) software versions have been updated to be:
Python version 3.13.0b3
matplotlib version 3.9.1
eccodes version 2.35.0

For these versions, all tests pass except for test_gaussian:

# pytest test_gaussian.py --mpl --mpl-baseline-path=`pwd`/baseline_images
================================== test session starts ===================================
platform linux -- Python 3.13.0b3, pytest-7.4.3, pluggy-1.3.0
Matplotlib: 3.9.1
Freetype: 2.13.2
rootdir: /builddir/build/BUILD/pygrib-2.1.6-build/pygrib-2.1.6-tmp-test/test
plugins: mpl-0.13
collected 1 item                                                                         

test_gaussian.py F                                                                 [100%]

======================================== FAILURES ========================================
_____________________________________ test_gaussian ______________________________________
Error: Image files did not match.
  RMS Value: 31.307504414099967
  Expected:  
    /tmp/tmpolc15yoq/test_gaussian.test_gaussian/baseline.png
  Actual:    
    /tmp/tmpolc15yoq/test_gaussian.test_gaussian/result.png
  Difference:
    /tmp/tmpolc15yoq/test_gaussian.test_gaussian/result-failed-diff.png
  Tolerance: 
    20
================================ short test summary info =================================
FAILED test_gaussian.py::test_gaussian - Failed: Error: Image files did not match.
=================================== 1 failed in 1.16s ====================================

From visual inspection of the generated image it is clear that the generated image has been shifted upwards by a few pixels compared to the baseline reference inside its black framing rectangle, and this framing rectangle has at the same time increased size by a few pixels. The picture itself is still identical to the baseline.

As a workaround in the mpl_image_compare decorator, the tolerance can be increased from 20 to 32. Then the test passes again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions