From 0172d7b1e40de42fe1bdae876206138038132da6 Mon Sep 17 00:00:00 2001 From: Luke Campagnola Date: Fri, 3 Jun 2016 17:30:05 -0700 Subject: [PATCH] Fix pixel error in image tests by preventing an extra plot window from opening (no idea why this happens) --- .../graphicsItems/tests/test_ScatterPlotItem.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py b/pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py index 8b0ebc8f..acf6ad72 100644 --- a/pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py +++ b/pyqtgraph/graphicsItems/tests/test_ScatterPlotItem.py @@ -1,15 +1,15 @@ import pyqtgraph as pg import numpy as np app = pg.mkQApp() -plot = pg.plot() app.processEvents() -# set view range equal to its bounding rect. -# This causes plots to look the same regardless of pxMode. -plot.setRange(rect=plot.boundingRect()) def test_scatterplotitem(): + plot = pg.PlotWidget() + # set view range equal to its bounding rect. + # This causes plots to look the same regardless of pxMode. + plot.setRange(rect=plot.boundingRect()) for i, pxMode in enumerate([True, False]): for j, useCache in enumerate([True, False]): s = pg.ScatterPlotItem() @@ -54,6 +54,10 @@ def test_scatterplotitem(): def test_init_spots(): + plot = pg.PlotWidget() + # set view range equal to its bounding rect. + # This causes plots to look the same regardless of pxMode. + plot.setRange(rect=plot.boundingRect()) spots = [ {'x': 0, 'y': 1}, {'pos': (1, 2), 'pen': None, 'brush': None, 'data': 'zzz'},