Remove axes in ROI tests (these cause travis failures)
This commit is contained in:
parent
f32dce7908
commit
0d131e4be4
@ -134,9 +134,13 @@ def test_PolyLineROI():
|
|||||||
plt = pg.GraphicsView()
|
plt = pg.GraphicsView()
|
||||||
plt.show()
|
plt.show()
|
||||||
plt.resize(200, 200)
|
plt.resize(200, 200)
|
||||||
plt.plotItem = pg.PlotItem()
|
vb = pg.ViewBox()
|
||||||
plt.scene().addItem(plt.plotItem)
|
plt.scene().addItem(vb)
|
||||||
plt.plotItem.resize(200, 200)
|
vb.resize(200, 200)
|
||||||
|
#plt.plotItem = pg.PlotItem()
|
||||||
|
#plt.scene().addItem(plt.plotItem)
|
||||||
|
#plt.plotItem.resize(200, 200)
|
||||||
|
|
||||||
|
|
||||||
plt.scene().minDragTime = 0 # let us simulate mouse drags very quickly.
|
plt.scene().minDragTime = 0 # let us simulate mouse drags very quickly.
|
||||||
|
|
||||||
@ -145,9 +149,9 @@ def test_PolyLineROI():
|
|||||||
QtTest.QTest.qWait(100)
|
QtTest.QTest.qWait(100)
|
||||||
|
|
||||||
for r, name in rois:
|
for r, name in rois:
|
||||||
plt.plotItem.clear()
|
vb.clear()
|
||||||
plt.plotItem.addItem(r)
|
vb.addItem(r)
|
||||||
plt.plotItem.autoRange()
|
vb.autoRange()
|
||||||
app.processEvents()
|
app.processEvents()
|
||||||
|
|
||||||
assertImageApproved(plt, 'roi/polylineroi/'+name+'_init', 'Init %s polyline.' % name)
|
assertImageApproved(plt, 'roi/polylineroi/'+name+'_init', 'Init %s polyline.' % name)
|
||||||
|
@ -281,7 +281,7 @@ def makePng(img):
|
|||||||
"""Given an array like (H, W, 4), return a PNG-encoded byte string.
|
"""Given an array like (H, W, 4), return a PNG-encoded byte string.
|
||||||
"""
|
"""
|
||||||
io = QtCore.QBuffer()
|
io = QtCore.QBuffer()
|
||||||
qim = fn.makeQImage(img, alpha=False)
|
qim = fn.makeQImage(img.transpose(1, 0, 2), alpha=False)
|
||||||
qim.save(io, 'PNG')
|
qim.save(io, 'PNG')
|
||||||
png = bytes(io.data().data())
|
png = bytes(io.data().data())
|
||||||
return png
|
return png
|
||||||
|
Loading…
Reference in New Issue
Block a user