5 @author Brice Rebsamen <brice [dot] rebsamen [gmail]> 9 roslib.load_manifest(
'diagnostic_updater')
11 from diagnostic_updater
import *
18 self.assertEqual(d.level, 0)
19 self.assertEqual(d.message,
"")
20 self.assertEqual(d.values, [])
24 self.assertEqual(d.level, 1)
25 self.assertEqual(d.message,
"test")
26 self.assertEqual(d.values, [])
31 self.assertEqual(d.level, 1)
32 self.assertEqual(d.message,
"test")
36 m = DiagnosticStatus(level=1, message=
"warn")
38 self.assertEqual(d.level, 1)
39 self.assertEqual(d.message,
"warn")
44 self.assertEqual(d.level, 0)
45 self.assertEqual(d.message,
"")
49 d.mergeSummary(1,
"warn")
50 self.assertEqual(d.level, 1)
51 self.assertEqual(d.message,
"warn")
53 d.mergeSummary(2,
"err")
54 self.assertEqual(d.level, 2)
55 self.assertEqual(d.message,
"warn; err")
59 m = DiagnosticStatus(level=1, message=
"warn")
61 self.assertEqual(d.level, 1)
62 self.assertEqual(d.message,
"warn")
64 m = DiagnosticStatus(level=2, message=
"err")
66 self.assertEqual(d.level, 2)
67 self.assertEqual(d.message,
"warn; err")
72 self.assertEqual(d.values[0].key,
'key')
73 self.assertEqual(d.values[0].value,
'val')
75 if __name__ ==
'__main__':
def test_merge_summary_dmsg(self)
def test_summary_lvl_msg(self)
def test_init_lvl_msg(self)
def test_summary_dmsg(self)
def test_merge_summary_lvl_msg(self)
def test_clear_summary(self)
def test_init_empty(self)
Wrapper for the diagnostic_msgs::DiagnosticStatus message that makes it easier to update...