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 failed for new matplotlib #49

Open
Universebenzene opened this issue Dec 4, 2024 · 0 comments · May be fixed by #50
Open

Test failed for new matplotlib #49

Universebenzene opened this issue Dec 4, 2024 · 0 comments · May be fixed by #50

Comments

@Universebenzene
Copy link

mpl_scatter_density/tests/test_scatter_density_artist.py::test_resize_qt FAILED

===================================================== FAILURES ======================================================
__________________________________________________ test_resize_qt ___________________________________________________

    def test_resize_qt():
    
        # This test just ensures that the code runs, but doesn't check for now
        # that the behavior is correct.
    
        pytest.importorskip('PyQt5')
    
        from PyQt5.QtWidgets import QMainWindow
    
        from matplotlib.figure import Figure
        from matplotlib.backends.backend_qt5 import FigureManagerQT
        from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg
    
        fig = Figure()
        canvas = FigureCanvasQTAgg(fig)
        canvas.manager = FigureManagerQT(canvas, 0)  # noqa
        ax = fig.add_subplot(1, 1, 1)
    
        canvas.draw = Mock(side_effect=canvas.draw)
    
>       from matplotlib.backends.backend_qt5 import qApp
E       ImportError: cannot import name 'qApp' from 'matplotlib.backends.backend_qt5' (/usr/lib/python3.12/site-packages/matplotlib/backends/backend_qt5.py)

Figure     = <class 'matplotlib.figure.Figure'>
FigureCanvasQTAgg = <class 'matplotlib.backends.backend_qtagg.FigureCanvasQTAgg'>
FigureManagerQT = <class 'matplotlib.backends.backend_qt.FigureManagerQT'>
QMainWindow = <class 'PyQt5.QtWidgets.QMainWindow'>
ax         = <Axes: >
canvas     = <matplotlib.backends.backend_qtagg.FigureCanvasQTAgg object at 0x76e8ebc88050>
fig        = <Figure size 640x480 with 1 Axes>

mpl_scatter_density/tests/test_scatter_density_artist.py:268: ImportError

============================================== short test summary info ==============================================
FAILED mpl_scatter_density/tests/test_scatter_density_artist.py::test_resize_qt - ImportError: cannot import name 'qApp' from 'matplotlib.backends.backend_qt5' (/usr/lib/python3.12/site-packages/matplotlib/backends/backend_qt5.py)

It seems that qApp is deprecated since matplotlib 3.6 and removed in matplotlib 3.8

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