cleanup.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 from __future__ import print_function
4 
5 import unittest
6 import rostest
7 import subprocess
8 import rospkg
9 import roslib.packages
10 
11 PKGNAME = 'moveit_ros_planning_interface'
12 NODENAME = 'moveit_cleanup_tests'
13 
14 # As issue #592 is related to a crash during program exit,
15 # we cannot perform a standard unit test.
16 # We have to check the return value of the called program.
17 # As rostest doesn't do this automatically, we do it ourselves
18 # and call the actual test program here.
19 class CleanupTest(unittest.TestCase):
20  def __init__(self, *args, **kwargs):
21  super(CleanupTest, self).__init__(*args, **kwargs)
22  self._rospack = rospkg.RosPack()
23 
24  def test_py(self):
25  cmd = roslib.packages.find_node(PKGNAME, "movegroup_interface.py", self._rospack)
26  self.assertTrue(subprocess.call(cmd) == 0)
27 
28  def test_cpp(self):
29  cmd = roslib.packages.find_node(PKGNAME, "test_cleanup", self._rospack)
30  self.assertTrue(subprocess.call(cmd) == 0)
31 
32 if __name__ == '__main__':
33  rostest.rosrun(PKGNAME, NODENAME, CleanupTest)
def test_cpp(self)
Definition: cleanup.py:28
def __init__(self, args, kwargs)
Definition: cleanup.py:20
def test_py(self)
Definition: cleanup.py:24


planning_interface
Author(s): Ioan Sucan
autogenerated on Wed Jul 10 2019 04:04:11