diff --git a/tests/test_hand_recogniser.py b/tests/test_hand_recogniser.py index f99fc09..bc9e4ed 100644 --- a/tests/test_hand_recogniser.py +++ b/tests/test_hand_recogniser.py @@ -1,5 +1,5 @@ import unittest -from GestureRecognition.SimpleHandRecogniser import SimpleHandRecogniser +from GestureRecognition.simplehandrecogniser import SimpleHandRecogniser import cv2 class TestSimpleHandRecogniser(unittest.TestCase): @@ -10,14 +10,21 @@ class TestSimpleHandRecogniser(unittest.TestCase): def test_3_digits(self): self.assertEqual(self.recogniser_3.get_gesture(), 3) + def test_s_photo(self): + self.assertEqual(self.recogniser_s.get_gesture(), 5) + def setUp(self): - img_3 = cv2.imread("H:\car\GestureRecognition\IMG_0825.jpg") + img_3 = cv2.imread("/Users/piv/Documents/Projects/car/GestureRecognition/IMG_0825.jpg") img_3 = cv2.resize(img_3, None, fx=0.1, fy=0.1, interpolation = cv2.INTER_AREA) self.recogniser_3 = SimpleHandRecogniser(img_3) - img_5 = cv2.imread("H:\car\GestureRecognition\IMG_0818.png") + img_5 = cv2.imread("/Users/piv/Documents/Projects/car/GestureRecognition/IMG_0818.png") img_5 = cv2.resize(img_5, None, fx=0.1, fy=0.1, interpolation = cv2.INTER_AREA) self.recogniser_5 = SimpleHandRecogniser(img_5) + img_s = cv2.imread("/Users/piv/Documents/Projects/car/GestureRecognition/Screen Shot hand.png") + img_s = cv2.resize(img_s, None, fx=0.5, fy=0.5, interpolation = cv2.INTER_AREA) + self.recogniser_s = SimpleHandRecogniser(img_s) + if __name__ == '__main__': unittest.main() \ No newline at end of file diff --git a/tests/test_mqtt_voter.py b/tests/test_mqtt_voter.py index b76f951..17ba79f 100644 --- a/tests/test_mqtt_voter.py +++ b/tests/test_mqtt_voter.py @@ -1,6 +1,5 @@ import unittest -from DecisionSystem.mqttvoter import MqttVoter -from DecisionSystem.vote import Vote +from DecisionSystem.CentralisedDecision.ballotvoter import BallotVoter class TestMqttVoter(unittest.TestCase):