Coverage for tests/testNeoDistancePlotter.py : 45%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
rng = np.random.RandomState(61723009) names = ['eclipLat', 'eclipLon', 'MaxGeoDist', 'NEOHelioX', 'NEOHelioY', 'filter'] types = [float]*5 types.append('|S1') npts = 100 self.metricValues = np.zeros(npts, list(zip(names, types))) self.metricValues['MaxGeoDist'] = rng.rand(npts)*2. self.metricValues['eclipLat'] = rng.rand(npts) self.metricValues['NEOHelioX'] = rng.rand(npts)*3-1.5 self.metricValues['NEOHelioY'] = rng.rand(npts)*3-1.5+1 self.metricValues['filter'] = 'g'
""" Just test that it can make a figure without throwing an error. """ plotter = plots.NeoDistancePlotter() # Need to wrap in a list because it will usually go through the # UniSlicer, and will thus be an array inside a 1-element masked array fig = plotter([self.metricValues], None, {}) self.assertNotEqual(fig, None)
lsst.utils.tests.init()
lsst.utils.tests.init() unittest.main() |