Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fad82b8

Browse files
authored
Merge pull request #9385 from anntzer/qt5-test-coverage
TST: Bump test coverage of Qt5 UI.
2 parents 14d68df + a12a7ee commit fad82b8

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

lib/matplotlib/tests/test_backend_qt5.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,3 +161,23 @@ def test_dpi_ratio_change():
161161
assert size.height() == 240
162162
assert_equal(qt_canvas.get_width_height(), (600, 240))
163163
assert_equal(fig.get_size_inches(), (5, 2))
164+
165+
166+
@pytest.mark.backend('Qt5Agg')
167+
def test_subplottool():
168+
fig, ax = plt.subplots()
169+
with mock.patch(
170+
"matplotlib.backends.backend_qt5.SubplotToolQt.exec_",
171+
lambda self: None):
172+
fig.canvas.manager.toolbar.configure_subplots()
173+
174+
175+
@pytest.mark.backend('Qt5Agg')
176+
def test_figureoptions():
177+
fig, ax = plt.subplots()
178+
ax.plot([1, 2])
179+
ax.imshow([[1]])
180+
with mock.patch(
181+
"matplotlib.backends.qt_editor.formlayout.FormDialog.exec_",
182+
lambda self: None):
183+
fig.canvas.manager.toolbar.edit_parameters()

0 commit comments

Comments
 (0)