From 10f92cdf0d847215981ac87f39d59d131f5d2092 Mon Sep 17 00:00:00 2001 From: Nikolay Khabarov <2xl@mail.ru> Date: Sat, 17 Jun 2017 01:19:07 +0300 Subject: [PATCH] add pid basic test --- tests/test_pid.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_pid.py b/tests/test_pid.py index 4fb8d8d..90fa4ff 100644 --- a/tests/test_pid.py +++ b/tests/test_pid.py @@ -49,6 +49,11 @@ class TestPid(unittest.TestCase): msg="failed to heat in 10 minutes, final temperature " "{}/{}".format(temperature, target_temp)) + def test_simple(self): + pid = Pid(50, 0) + self.assertEqual(0, pid.update(100, 1)) + self.assertEqual(1, pid.update(0, 2)) + def test_bed(self): # check if bed typical temperatures can be reached in simulation for target in range(50, 101, 10):