19 sys.path.insert(1,
"../")
24 from BufferBase
import *
28 self.
nb = NullBuffer()
32 OpenRTM_aist.Manager.instance().shutdownManager()
36 self.assertEqual(self.nb.length(),1)
42 self.assertEqual(self.nb.write(10000),
True)
44 self.assertEqual(data[0], 10000)
47 self.assertEqual(self.nb.write(1.2345),
True)
49 self.assertEqual(data[0], 1.2345)
52 self.assertEqual(self.nb.write(
"test"),
True)
54 self.assertEqual(data[0],
"test")
57 self.assertEqual(self.nb.write([1,2,3]),
True)
59 self.assertEqual(data[0], [1,2,3])
63 self.assertEqual(self.nb.isEmpty(),
False)
68 self.assertEqual(self.nb.isNew(),
False)
70 self.assertEqual(self.nb.isNew(),
False)
71 self.assertEqual(self.nb.write(10000),
True)
72 self.assertEqual(self.nb.isNew(),
True)
76 if __name__ ==
'__main__':