From 36d89fa3a52653df80674c48c02ae753f7c75bd3 Mon Sep 17 00:00:00 2001 From: Ogi Moore Date: Thu, 11 Feb 2021 22:20:23 -0800 Subject: [PATCH] Have test_PlotCurveItem use GraphicsLayoutWidget and not the deprecated GraphicsWindow --- pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py b/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py index 6d60d3e1..80dee478 100644 --- a/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py +++ b/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py @@ -4,10 +4,11 @@ from pyqtgraph.tests import assertImageApproved def test_PlotCurveItem(): - p = pg.GraphicsWindow() - p.ci.layout.setContentsMargins(4, 4, 4, 4) # default margins vary by platform - v = p.addViewBox() + p = pg.GraphicsLayoutWidget() p.resize(200, 150) + p.ci.setContentsMargins(4, 4, 4, 4) # default margins vary by platform + p.show() + v = p.addViewBox() data = np.array([1,4,2,3,np.inf,5,7,6,-np.inf,8,10,9,np.nan,-1,-2,0]) c = pg.PlotCurveItem(data) v.addItem(c)