add pid basic test

This commit is contained in:
Nikolay Khabarov
2017-06-17 01:19:07 +03:00
parent 7dd1ce4fd2
commit 10f92cdf0d

View File

@@ -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):