Skip to content

Commit 661abed

Browse files
Update unit tests
1 parent 97dce09 commit 661abed

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/test_live_plot.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,21 @@ def test_add_twice(self):
5757
def test_send(self):
5858
plot = self.make_test_plot()
5959
plot.send("foo", 1.0)
60-
self.assertFalse("foo" in plot.series)
61-
plot.add_left("foo")
6260
self.assertTrue("foo" in plot.series)
6361
plot.send("foo", 2.0)
6462
plot.send("foo", 3.0)
6563
self.assertAlmostEqual(plot.series["foo"][-1], 3.0)
6664

65+
def test_push(self):
66+
plot = self.make_test_plot()
67+
plot.push("foo", 1.0)
68+
self.assertFalse("foo" in plot.series)
69+
plot.add_left("foo")
70+
self.assertTrue("foo" in plot.series)
71+
plot.push("foo", 2.0)
72+
plot.push("foo", 3.0)
73+
self.assertAlmostEqual(plot.series["foo"][-1], 3.0)
74+
6775
def test_update(self):
6876
plot = self.make_test_plot()
6977
plot.add_left("foo")

0 commit comments

Comments
 (0)