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

Method test_model_loading

tests/TestModelLoading.py:145–178  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

143 msg='\nTesting section "'+section+'"\n'+diff.to_string())
144
145 def test_model_loading(self):
146 self.longMessage = True
147
148 self.BuildReference('c1724.xml')
149 output_ref = pd.read_csv('JSBout172B.csv', index_col=0)
150
151 self.ProcessAndCompare('aerodynamics')
152 self.ProcessAndCompare('autopilot')
153 self.ProcessAndCompare('flight_control')
154 self.ProcessAndCompare('ground_reactions')
155 self.ProcessAndCompare('mass_balance')
156 self.ProcessAndCompare('metrics')
157 self.ProcessAndCompare('propulsion')
158 self.ProcessAndCompare('system')
159
160 # The <output> section needs special handling. In addition to the check
161 # conducted by ProcessAndCompare with a directive file, we need to
162 # verify that the <output> tag has been correctly executed by JSBSim.
163 # In the case of the script c1724.xml, this means that the data output
164 # in JSBout172B.csv is the same between the reference 'output_ref' and
165 # the result 'mod' below where the <output> tag was moved in a separate
166 # file.
167 self.ProcessAndCompare('output')
168 mod = pd.read_csv('JSBout172B.csv', index_col=0)
169 self.assertTrue(isDataMatching(output_ref, mod))
170 diff = FindDifferences(output_ref, mod, 0.0)
171 self.assertEqual(len(diff), 0,
172 msg='\nTesting section "output"\n'+diff.to_string())
173
174 self.BuildReference('weather-balloon.xml')
175 self.ProcessAndCompare('buoyant_forces')
176
177 self.BuildReference('Concorde_runway_test.xml')
178 self.ProcessAndCompare('external_reactions')
179
180RunTest(TestModelLoading)

Callers

nothing calls this directly

Calls 5

BuildReferenceMethod · 0.95
ProcessAndCompareMethod · 0.95
isDataMatchingFunction · 0.90
FindDifferencesFunction · 0.90
assertEqualMethod · 0.80

Tested by

no test coverage detected