Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

TST: Prepare for pytest 9 #28195

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

Merged
merged 1 commit into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions 6 lib/matplotlib/tests/test_backend_bases.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import importlib

from matplotlib import path, transforms
from matplotlib.backend_bases import (
FigureCanvasBase, KeyEvent, LocationEvent, MouseButton, MouseEvent,
Expand Down Expand Up @@ -325,9 +327,7 @@ def test_toolbar_home_restores_autoscale():
def test_draw(backend):
from matplotlib.figure import Figure
from matplotlib.backends.backend_agg import FigureCanvas
test_backend = pytest.importorskip(
f'matplotlib.backends.backend_{backend}'
)
test_backend = importlib.import_module(f'matplotlib.backends.backend_{backend}')
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

backend here is svg, ps, pdf, or pgf, which are not expected to fail (maybe they used to when Pillow was optional?)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe crossed streams with the mark on the pgf parameter?

TestCanvas = test_backend.FigureCanvas
fig_test = Figure(constrained_layout=True)
TestCanvas(fig_test)
Expand Down
3 changes: 0 additions & 3 deletions 3 lib/matplotlib/tests/test_backend_gtk3.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
import pytest


pytest.importorskip("matplotlib.backends.backend_gtk3agg")


@pytest.mark.backend("gtk3agg", skip_on_importerror=True)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the only test, so the backend switch covers the import check.

def test_correct_key():
pytest.xfail("test_widget_send_event is not triggering key_press_event")
Expand Down
4 changes: 1 addition & 3 deletions 4 lib/matplotlib/tests/test_backend_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,7 @@

@pytest.fixture
def qt_core(request):
qt_compat = pytest.importorskip('matplotlib.backends.qt_compat')
QtCore = qt_compat.QtCore

from matplotlib.backends.qt_compat import QtCore
Copy link
Member Author

@QuLogic QuLogic May 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qt_compat is checked above on line 18, and the whole module is skipped.

return QtCore


Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.