diff options
author | Andreas Antener <antener_a@gmx.ch> | 2015-02-23 18:33:10 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@gmail.com> | 2015-02-28 18:25:36 +0100 |
commit | 85ac3e3515bc214a770074182617208b24ee0209 (patch) | |
tree | 5e91c5fe66ee9e5f9d87d0e4a957b74f4fdcd3a5 /integrationtests/demo_tests/direct_arm_test.py | |
parent | 75f1678047e2beb4ec4e1cf7fd383685175d3694 (diff) | |
download | px4-firmware-85ac3e3515bc214a770074182617208b24ee0209.tar.gz px4-firmware-85ac3e3515bc214a770074182617208b24ee0209.tar.bz2 px4-firmware-85ac3e3515bc214a770074182617208b24ee0209.zip |
renamed tests, added placeholder for mavros test
Diffstat (limited to 'integrationtests/demo_tests/direct_arm_test.py')
-rwxr-xr-x | integrationtests/demo_tests/direct_arm_test.py | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/integrationtests/demo_tests/direct_arm_test.py b/integrationtests/demo_tests/direct_arm_test.py new file mode 100755 index 000000000..569e0af7c --- /dev/null +++ b/integrationtests/demo_tests/direct_arm_test.py @@ -0,0 +1,37 @@ +#!/usr/bin/env python +PKG = 'px4' + +import sys +import unittest +import rospy + +from px4.msg import actuator_armed +from manual_input import ManualInput + +class ArmTest(unittest.TestCase): + + # + # General callback functions used in tests + # + def actuator_armed_callback(self, data): + self.actuatorStatus = data + + # + # Test arming + # + def test_arm(self): + rospy.init_node('test_node', anonymous=True) + sub = rospy.Subscriber('px4_multicopter/actuator_armed', actuator_armed, self.actuator_armed_callback) + + # method to test + arm = ManualInput() + arm.arm() + + self.assertEquals(self.actuatorStatus.armed, True, "not armed") + + + + +if __name__ == '__main__': + import rostest + rostest.rosrun(PKG, 'arm_test', ArmTest) |