Eclectic Media Git pingstats / 15ff316
Updated tests to reflect 739e898 - Makes plot tests aware of which backend is in use. Ariana Giroux 9 months ago
1 changed file(s) with 20 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
202202
203203 test_object = ui.RealtimePlot(test_columns, test_rows, test_pings)
204204
205 assert isinstance(test_object, ui.PlotWidget)
205 assert isinstance(test_object, ui.PingWidget if 'hipsterplot' not in dir(pingstats) else ui._HipsterPlotWidget)
206206
207207 result_captured = capsys.readouterr()
208208
209 plot_pings(test_data, test_columns - X_COLUMN_SCALE, test_rows - Y_ROW_SCALE)
209 plot_pings(
210 test_data,
211 test_columns if 'hipsterplot' not in dir(pingstats) else test_columns - X_COLUMN_SCALE,
212 test_rows if 'hipsterplot' not in dir(pingstats) else test_rows - Y_ROW_SCALE)
210213
211214 test_captured = capsys.readouterr()
212215
222225
223226 test_object = ui.AveragePlot(test_columns, test_rows, test_pings)
224227
225 assert isinstance(test_object, ui.PlotWidget)
228 assert isinstance(test_object, ui.PingWidget if 'hipsterplot' not in dir(pingstats) else ui._HipsterPlotWidget)
226229
227230 result_captured = capsys.readouterr()
228231
229 plot_pings(test_data, test_columns - X_COLUMN_SCALE, test_rows - Y_ROW_SCALE)
232 plot_pings(
233 test_data,
234 test_columns if 'hipsterplot' not in dir(pingstats) else test_columns - X_COLUMN_SCALE,
235 test_rows if 'hipsterplot' not in dir(pingstats) else test_rows - Y_ROW_SCALE)
230236
231237 test_captured = capsys.readouterr()
232238
240246
241247 test_object = ui.RealtimePane(test_columns, test_rows, test_pings)
242248
243 assert isinstance(test_object, ui.PlotWidget)
249 assert isinstance(test_object, ui.PingWidget if 'hipsterplot' not in dir(pingstats) else ui._HipsterPlotWidget)
244250
245251 result_captured = capsys.readouterr()
246252
247 plot_pings(test_data, test_columns - X_COLUMN_SCALE, test_rows - Y_ROW_SCALE)
253 plot_pings(
254 test_data,
255 test_columns if 'hipsterplot' not in dir(pingstats) else test_columns - X_COLUMN_SCALE,
256 test_rows if 'hipsterplot' not in dir(pingstats) else test_rows - Y_ROW_SCALE)
248257 ui.RealtimeStatus(test_columns, test_rows, test_pings)
249258
250259 test_captured = capsys.readouterr()
258267
259268 test_object = ui.AveragePane(test_columns, test_rows, test_pings)
260269
261 assert isinstance(test_object, ui.PlotWidget)
270 assert isinstance(test_object, ui.PingWidget if 'hipsterplot' not in dir(pingstats) else ui._HipsterPlotWidget)
262271
263272 result_captured = capsys.readouterr()
264273
265 plot_pings(test_data, test_columns, test_rows)
274 plot_pings(
275 test_data,
276 test_columns if 'hipsterplot' not in dir(pingstats) else test_columns - X_COLUMN_SCALE,
277 test_rows if 'hipsterplot' not in dir(pingstats) else test_rows - Y_ROW_SCALE)
266278 ui.AverageStatus(test_columns, test_rows, test_pings)
267279
268280 test_captured = capsys.readouterr()