MCPcopy Create free account
hub / github.com/JSBSim-Team/jsbsim / ProcessAndCompare

Method ProcessAndCompare

tests/TestModelLoading.py:53–65  ·  view source on GitHub ↗
(self, section)

Source from the content-addressed store, hash-verified

51 self.aircraft_path = os.path.join('aircraft', self.aircraft_name)
52
53 def ProcessAndCompare(self, section):
54 # Here we determine if the original aircraft definition <section> is
55 # inline or read from an external file.
56 tree = et.parse(os.path.join(self.path_to_jsbsim_aircrafts,
57 self.aircraft_name + '.xml'))
58 root = tree.getroot()
59
60 # Iterate over all the tags named <section>
61 for section_element in root.findall(section):
62 if 'file' in section_element.keys():
63 self.InsertAndCompare(section_element, tree)
64 else:
65 self.DetachAndCompare(section_element, tree)
66
67 def DetachAndCompare(self, section_element, tree):
68 # Extract <section> from the original aircraft definition file and copy

Callers 1

test_model_loadingMethod · 0.95

Calls 3

InsertAndCompareMethod · 0.95
DetachAndCompareMethod · 0.95
joinMethod · 0.80

Tested by

no test coverage detected