diff --git a/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py b/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py index 8e319cb7..9a5eed55 100644 --- a/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py +++ b/hironx_ros_bridge/src/hironx_ros_bridge/hironx_client.py @@ -471,7 +471,6 @@ def getRTCList(self, rtcs_str=None): required RTCs. ''' if rtcs_str: - print('[getRTCList][DEBUG] In rtcs_str') if not isinstance(rtcs_str, basestring): raise TypeError('rtcs_str needs to be string.') # Set a new list of RTCs @@ -501,6 +500,7 @@ def getRTCList(self, rtcs_str=None): self._RTC_list.append(['rmfo', "AbsoluteForceSensor"]) else: print "Component rmfo is not loadable." + print('[getRTCList][DEBUG] _RTC_list: {}'.format(self._RTC_list)) return self._RTC_list # hand interface diff --git a/hironx_ros_bridge/test/test_hironx_client.py b/hironx_ros_bridge/test/test_hironx_client.py index 3bc00047..63b566b3 100755 --- a/hironx_ros_bridge/test/test_hironx_client.py +++ b/hironx_ros_bridge/test/test_hironx_client.py @@ -85,9 +85,9 @@ def test_getRTCList_customrtcs_args_wrong(self): ''' # Passing 1st elems from _RTC_LIST_CUSTOM, # but list is not the right type of arg. - self.assertRaises( - TypeError, - self.robot.getRTCList(rtcs_str=['seq', 'sh', 'fk', 'el', 'co', 'log'])) + with self.assertRaises(TypeError): + # http://stackoverflow.com/questions/6103825/how-to-properly-use-unit-testings-assertraises-with-nonetype-objects + self.robot.getRTCList(rtcs_str=['seq', 'sh', 'fk', 'el', 'co', 'log']) # Passing the list of RTCs falling short of requirement. self.assertRaises(