Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5cd30d2 commit 1d7bbf9Copy full SHA for 1d7bbf9
1 file changed
lib/matplotlib/tests/test_backend_qt.py
@@ -4,6 +4,7 @@
4
5
import matplotlib
6
from matplotlib import pyplot as plt
7
+from matplotlib import rcParams
8
from matplotlib._pylab_helpers import Gcf
9
10
import pytest
@@ -281,10 +282,14 @@ def test_double_resize():
281
282
fig.canvas.draw()
283
window = fig.canvas.manager.window
284
- fig.set_size_inches(2, 2)
285
+ w, h = 3, 2
286
+ fig.set_size_inches(w, h)
287
+ assert fig.canvas.width() == w * rcParams['figure.dpi']
288
+ assert fig.canvas.height() == h * rcParams['figure.dpi']
289
+
290
old_width = window.width()
291
old_height = window.height()
292
293
294
assert window.width() == old_width
295
assert window.height() == old_height
0 commit comments