Skip to content
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

Test failure with Matplotlib 3.8.0rc1 #13

Closed
QuLogic opened this issue Aug 24, 2023 · 2 comments
Closed

Test failure with Matplotlib 3.8.0rc1 #13

QuLogic opened this issue Aug 24, 2023 · 2 comments

Comments

@QuLogic
Copy link

QuLogic commented Aug 24, 2023

I'm trying out Matplotlib 3.8.0rc1 and there's 1 test failure that doesn't occur with 3.7.2:

_________________________ TestComparisons.test_Surface _________________________

args = (<tests.test_blocks.TestComparisons object at 0x7f6be24cbe30>,)
kwargs = {}, anim = <animatplot.animation.Animation object at 0x7f6be23a25d0>
fignum = 1, fig = <Figure size 640x480 with 1 Axes>

    @functools.wraps(func)
    def wrapper(*args, **kwargs):
        # First close anything from previous tests
        plt.close("all")
    
        anim = func(*args, **kwargs)
        if remove_text:
            fignum = plt.get_fignums()[0]
            fig = plt.figure(fignum)
            remove_ticks_and_titles(fig)
        try:
>           _compare_animation(anim, baseline_images, fmt, nframes, tol)

tests/tools.py:78: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

anim = <animatplot.animation.Animation object at 0x7f6be23a25d0>
expected = 'Blocks/Surface', format_ = '.png', nframes = 3, tol = 0.001

    def _compare_animation(anim, expected, format_, nframes, tol):
        # generate images from the animation
        base_dir, filename = split(join("tests", "baseline_images", expected))
        out_dir = split(join("tests", "output_images", expected))[0]
    
        if not os.path.exists(out_dir):
            os.makedirs(out_dir)
    
        anim.save(os.path.join(out_dir, (filename + format_)), writer=BunchOFiles())
    
        for i in range(nframes):
            image_name = "%s%d%s" % (filename, i, format_)
            expected_name = os.path.join(base_dir, image_name)
            actual_name = os.path.join(out_dir, image_name)
    
            err = compare_images(expected_name, actual_name, tol, in_decorator=True)
    
            if not os.path.exists(expected_name):
                raise ImageComparisonFailure("image does not exist: %s" % expected_name)
    
            if err:
                for key in ["actual", "expected"]:
                    err[key] = os.path.relpath(err[key])
>               raise ImageComparisonFailure(
                    "images not close (RMS %(rms).3f):\n\t%(actual)s\n\t%(expected)s " % err
                )
E               matplotlib.testing.exceptions.ImageComparisonFailure: images not close (RMS 0.222):
E               	tests/output_images/Blocks/Surface0.png
E               	tests/baseline_images/Blocks/Surface0.png

tests/tools.py:60: ImageComparisonFailure
@dschwoerer
Copy link
Collaborator

Thanks for the builds and the heads up 👍

I will look into it.

@dschwoerer
Copy link
Collaborator

Resolved by #16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants