test_parser.py
Go to the documentation of this file.
1 
4 
5 """Automatic testing for qicore file's parser
6 .. module:: test
7 """
8 
9 import os
10 
11 import converter.xar_parser as xar_parser
12 
13 import converter.behavior_parser as behavior_parser
14 import converter.behavior_sequence_parser as sequence_parser
15 import converter.box_interface_parser as interface_parser
16 import converter.animation_parser as animation_parser
17 import converter.flow_diagram_parser as diagram_parser
18 
19 
20 def test_parseOldFormat(parse_args):
21  """ code to parse behavior.xar and get root
22  looking for no throw and root not None
23  """
24  filename = os.path.abspath(parse_args[0])
25  root_node = xar_parser.generate_tree_from_filename(filename)
26  assert root_node
27 
28 
30  """ code to parse behavior.xar and get root
31  looking for no throw and root not None
32  """
33  filename = os.path.abspath(parse_args[1])
34  root_node = behavior_parser.generate_tree_from_filename(filename)
35  assert root_node
36 
37 
39  """ code to parse <box interface>.xml and get root
40  looking for no throw and root not None
41  """
42  filename = os.path.abspath(parse_args[2])
43  root_node = interface_parser.generate_tree_from_filename(filename)
44  assert root_node
45 
46 
48  """ code to parse <behavior sequence>.bhs and get root
49  looking for no throw and root not None
50  """
51  filename = os.path.abspath(parse_args[3])
52  root_node = sequence_parser.generate_tree_from_filename(filename)
53  assert root_node
54 
55 
57  """ code to parse <animation>.anim and get root
58  looking for no throw and root not None
59  """
60  filename = os.path.abspath(parse_args[4])
61  root_node = animation_parser.generate_tree_from_filename(filename)
62  assert root_node
63 
64 
66  """ code to parse <flow diagram>.fld and get root
67  looking for no throw and root not None
68  """
69  filename = os.path.abspath(parse_args[5])
70  root_node = diagram_parser.generate_tree_from_filename(filename)
71  assert root_node
converter.box_interface_parser
Definition: box_interface_parser.py:1
converter.test.test_parser.test_parseOldFormat
def test_parseOldFormat(parse_args)
Definition: test_parser.py:20
converter.xar_parser
Definition: xar_parser.py:1
converter.test.test_parser.test_parseNewBehaviorSequenceFormat
def test_parseNewBehaviorSequenceFormat(parse_args)
Definition: test_parser.py:47
converter.test.test_parser.test_parseNewBoxInterfaceFormat
def test_parseNewBoxInterfaceFormat(parse_args)
Definition: test_parser.py:38
converter.behavior_sequence_parser
Definition: behavior_sequence_parser.py:1
converter.behavior_parser
Definition: behavior_parser.py:1
converter.flow_diagram_parser
Definition: flow_diagram_parser.py:1
converter.animation_parser
Definition: animation_parser.py:1
converter.test.test_parser.test_parseNewAnimationFormat
def test_parseNewAnimationFormat(parse_args)
Definition: test_parser.py:56
converter.test.test_parser.test_parseNewFlowDiagramFormat
def test_parseNewFlowDiagramFormat(parse_args)
Definition: test_parser.py:65
converter.test.test_parser.test_parseNewBehaviorFormat
def test_parseNewBehaviorFormat(parse_args)
Definition: test_parser.py:29


naoqi_libqicore
Author(s): Aldebaran
autogenerated on Wed Sep 14 2022 02:22:41