Skip to content
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 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}')
TestCanvas = test_backend.FigureCanvas
fig_test = Figure(constrained_layout=True)
TestCanvas(fig_test)
Expand Down
3 changes: 0 additions & 3 deletions 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)
def test_correct_key():
pytest.xfail("test_widget_send_event is not triggering key_press_event")
Expand Down
4 changes: 1 addition & 3 deletions 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
return QtCore


Expand Down