diff --git a/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py b/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py index 56722848..e2a641e0 100644 --- a/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py +++ b/pyqtgraph/graphicsItems/tests/test_PlotCurveItem.py @@ -4,13 +4,15 @@ from pyqtgraph.tests import assertImageApproved def test_PlotCurveItem(): - p = pg.plot() + p = pg.GraphicsWindow() + v = p.addViewBox() p.resize(200, 150) 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) - p.addItem(c) - p.autoRange() + v.addItem(c) + v.autoRange() + assert np.allclose(v.viewRange(), [[-1.1457564053237301, 16.145756405323731], [-3.076811473165955, 11.076811473165955]]) assertImageApproved(p, 'plotcurveitem/connectall', "Plot curve with all points connected.") c.setData(data, connect='pairs') diff --git a/pyqtgraph/tests/image_testing.py b/pyqtgraph/tests/image_testing.py index 16ed14d9..4dbc2b82 100644 --- a/pyqtgraph/tests/image_testing.py +++ b/pyqtgraph/tests/image_testing.py @@ -62,7 +62,7 @@ from .. import ImageItem, TextItem # This tag marks the test-data commit that this version of pyqtgraph should # be tested against. When adding or changing test images, create # and push a new tag and update this variable. -testDataTag = 'test-data-2' +testDataTag = 'test-data-3' tester = None