(self, script_name)
| 29 | |
| 30 | class TestModelLoading(JSBSimTestCase): |
| 31 | def BuildReference(self, script_name): |
| 32 | # Run the script |
| 33 | self.script = self.sandbox.path_to_jsbsim_file('scripts', script_name) |
| 34 | self.sandbox.delete_csv_files() |
| 35 | fdm = CreateFDM(self.sandbox) |
| 36 | fdm.set_output_directive(self.sandbox.path_to_jsbsim_file('tests', |
| 37 | 'output.xml')) |
| 38 | fdm.load_script(self.script) |
| 39 | fdm['simulation/randomseed'] = 0.0 |
| 40 | |
| 41 | fdm.run_ic() |
| 42 | ExecuteUntil(fdm, 50.0) |
| 43 | |
| 44 | self.ref = pd.read_csv("output.csv", index_col=0) |
| 45 | |
| 46 | # Since the script will work with modified versions of the aircraft XML |
| 47 | # definition file, we need to make a copy of the directory that |
| 48 | # contains all the input data of that aircraft |
| 49 | |
| 50 | tree, self.aircraft_name, self.path_to_jsbsim_aircrafts = CopyAircraftDef(self.script, self.sandbox) |
| 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 |
no test coverage detected