From: Bertrand <bco...@us...> - 2017-02-26 11:37:34
|
Update of /cvsroot/jsbsim/JSBSim/tests In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv13088/tests Modified Files: CheckAircrafts.py CheckOutputRate.py CheckSimTimeReset.py JSBSim_utils.py Log Message: Code clean up Index: CheckAircrafts.py =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/tests/CheckAircrafts.py,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -r1.4 -r1.5 *** CheckAircrafts.py 11 Jun 2016 16:19:01 -0000 1.4 --- CheckAircrafts.py 26 Feb 2017 11:37:30 -0000 1.5 *************** *** 21,25 **** import os ! from JSBSim_utils import JSBSimTestCase, append_xml, CreateFDM, CheckXMLFile, RunTest --- 21,25 ---- import os ! from JSBSim_utils import JSBSimTestCase, CreateFDM, CheckXMLFile, RunTest *************** *** 34,38 **** continue ! f = os.path.join(aircraft_path, d, append_xml(d)) # Is f an aircraft definition file ? --- 34,38 ---- continue ! f = os.path.join(aircraft_path, d, d+'.xml') # Is f an aircraft definition file ? Index: CheckOutputRate.py =================================================================== RCS file: /cvsroot/jsbsim/JSBSim/tests/CheckOutputRate.py,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -r1.6 -r1.7 *** CheckOutputRate.py 31 Jan 2016 11:29:41 -0000 1.6 --- CheckOutputRate.py 26 Feb 2017 11:37:30 -0000 1.7 *************** *** 37,50 **** self.tree = et.parse(self.script_path) root = self.tree.getroot() ! use_tag = root.find("./use") aircraft_name = use_tag.attrib['aircraft'] ! self.run_tag = root.find("./run") self.dt = float(self.run_tag.attrib['dt']) # Read the date at which the trim will be run ! event_tags = root.findall('./run/event') ! for event in event_tags: if event.attrib['name'] == 'Trim': ! cond_tag = event.find('./condition') self.trim_date = float(string.split(cond_tag.text)[-1]) break --- 37,49 ---- self.tree = et.parse(self.script_path) root = self.tree.getroot() ! use_tag = root.find('use') aircraft_name = use_tag.attrib['aircraft'] ! self.run_tag = root.find('run') self.dt = float(self.run_tag.attrib['dt']) # Read the date at which the trim will be run ! for event in root.findall('run/event'): if event.attrib['name'] == 'Trim': ! cond_tag = event.find('condition') self.trim_date = float(string.split(cond_tag.text)[-1]) break *************** *** 54,58 **** append_xml(ai |