2023-10-13 22:33:07 +03:00
|
|
|
from unittest import TestCase
|
|
|
|
|
|
|
|
from equipment.turtle_device import TurtleDevice
|
|
|
|
|
|
|
|
|
|
|
|
class TurtleDeviceTest(TestCase):
|
|
|
|
|
|
|
|
def setUp(self) -> None:
|
|
|
|
self.device = TurtleDevice()
|
|
|
|
|
|
|
|
def test_open(self):
|
|
|
|
self.device.open()
|
2023-11-06 21:18:57 +03:00
|
|
|
self.device.close()
|
|
|
|
|
|
|
|
def test_execute(self):
|
|
|
|
self.device.open()
|
|
|
|
dist = self.device.execute("distance", 1.0, 1.0)
|
|
|
|
self.assertAlmostEqual(dist, 1.41421, delta=1e-5)
|
|
|
|
self.device.close()
|