relax auto-range check

This commit is contained in:
Luke Campagnola 2016-02-14 13:29:20 -08:00
parent 5171e1f1c7
commit e712b86a38

View File

@ -12,7 +12,10 @@ def test_PlotCurveItem():
v.addItem(c)
v.autoRange()
assert np.allclose(v.viewRange(), [[-1.1457564053237301, 16.145756405323731], [-3.076811473165955, 11.076811473165955]])
# Check auto-range works. Some platform differences may be expected..
checkRange = np.array([[-1.1457564053237301, 16.145756405323731], [-3.076811473165955, 11.076811473165955]])
assert np.all(np.abs(np.array(v.viewRange()) - checkRange) < 0.1)
assertImageApproved(p, 'plotcurveitem/connectall', "Plot curve with all points connected.")
c.setData(data, connect='pairs')