FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[Bug]: test_save_figure_return seems flaky · Issue #30493 · matplotlib/matplotlib · GitHub

Repository navigation

[Bug]: test_save_figure_return seems flaky #30493

Closed

Description

Bug summary

When building on Fedora builders, I often get this failure, though it is not consistent and I've never had it happen locally.

Code for reproduction

pytest tests/test_backend_qt.py -k test_save_figure_return

Actual outcome

___________________________ test_save_figure_return ____________________________
[gw2] linux -- Python 3.14.0 /usr/bin/python3

    @pytest.mark.backend('QtAgg', skip_on_importerror=True)
    def test_save_figure_return():
        fig, ax = plt.subplots()
        ax.imshow([[1]])
        prop = "matplotlib.backends.qt_compat.QtWidgets.QFileDialog.getSaveFileName"
        with mock.patch(prop, return_value=("foobar.png", None)):
            fname = fig.canvas.manager.toolbar.save_figure()
>           os.remove("foobar.png")
E           FileNotFoundError: [Errno 2] No such file or directory: 'foobar.png'

../BUILDROOT/usr/lib64/python3.14/site-packages/matplotlib/tests/test_backend_qt.py:228: FileNotFoundError

Expected outcome

Tests always pass.

Additional information

No response

Operating system

No response

Matplotlib Version

3.10.6

Matplotlib Backend

No response

Python version

No response

Jupyter version

No response

Installation

from source (.tar.gz)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions


      Back | FazBrowse Home | New Git URL