Browse Source

update test to cover rendering the bar chart

Daniel Sheffield 1 year ago
parent
commit
2255616b2e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      test/test_widgets.py

+ 2 - 1
test/test_widgets.py

@@ -65,12 +65,13 @@ def bargraph():
     None,
     None,
 ])
 ])
 def test_flow_bar_graph_with_vscale(bargraph: FlowBarGraphWithVScale, vscale: Tuple[float]):
 def test_flow_bar_graph_with_vscale(bargraph: FlowBarGraphWithVScale, vscale: Tuple[float]):
-    bargraph.set_data([1,2,3], 3, vscale=vscale)
+    bargraph.set_data([[1],[2],[3]], 3, vscale=vscale)
     bargraph.set_caption('my data')
     bargraph.set_caption('my data')
     assert bargraph.total_width == 50
     assert bargraph.total_width == 50
     assert bargraph.canvas_width == 50 - bargraph._vscale_width
     assert bargraph.canvas_width == 50 - bargraph._vscale_width
     assert bargraph.height == 14
     assert bargraph.height == 14
     bargraph.set_bar_width(2)
     bargraph.set_bar_width(2)
+    bargraph.render((100,))
 
 
 @fixture
 @fixture
 def notabcheckbox():
 def notabcheckbox():