10 """integration test, call C++ library interface from Python"""
13 """test the return number"""
14 self.assertEqual( calc.getNumber(), 1234 )
17 """start/stop tick command test"""
18 cmdmgr = calc.CommandManager()
19 cmd_id = cmdmgr.start()
20 self.assertNotEqual( cmdmgr.getState(cmd_id), calc.DONE )
23 if cmdmgr.getState(cmd_id) == calc.DONE:
25 self.assertEqual( cmdmgr.getState(cmd_id), calc.DONE )
26 self.assertEqual( len(cmdmgr.getIds()), 1 )
30 """module view test"""
33 """check if service return proper dict"""
34 self.assertEqual( views.getNumber({}), {
'number': 1234})
37 """check if service return proper dict"""
38 self.assertEqual( views.getCommands({}),
39 {1: {
'progress': 0.995,
'state':
'DONE'}})
40 dict1 = views.getCommands({})
41 views.startCommand({});
42 dict2 = views.getCommands({})
43 self.assertEqual( len(dict1) + 1, len(dict2) )
def test01getNumber(self)
def test02getCommands(self)
def test01getNumber(self)