/[escript]/trunk/escript/test/python/run_xml.py
ViewVC logotype

Diff of /trunk/escript/test/python/run_xml.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2455 by jfenwick, Wed Jun 3 03:29:07 2009 UTC revision 2468 by gross, Thu Jun 11 02:55:51 2009 UTC
# Line 91  class SimulationTestCase(unittest.TestCa Line 91  class SimulationTestCase(unittest.TestCa
91                    
92          xml = ESySXMLParser(self.xml)          xml = ESySXMLParser(self.xml)
93          newSim = xml.parse()[0]          newSim = xml.parse()[0]
94          assert (isinstance (newSim, Simulation))          assert isinstance(newSim, Simulation)
95          newout = StringIO()          newout = StringIO()
96          newSim.writeXML(newout)          newSim.writeXML(newout)
97          newout.reset()          newout.reset()
# Line 230  class ParamaterSetTestCase(unittest.Test Line 230  class ParamaterSetTestCase(unittest.Test
230    
231  # This method is disabled until the correct behaviour for lists of bools is decided  # This method is disabled until the correct behaviour for lists of bools is decided
232  #numarray converts them into ints whereas numpy leaves them as bools  #numarray converts them into ints whereas numpy leaves them as bools
233      #def testBoolLists(self):      def testBoolLists(self):
234          #p4 = ParameterSet()          p4 = ParameterSet()
235          #mylist = [True, False, False, True]          mylist = [True, False, False, True]
236          #p4.declareParameter(listest=mylist)          p4.declareParameter(listest=mylist)
237          #doc = self._class(p4)          doc = self._class(p4)
238          #assert type(doc.listest) == numpy.ndarray          assert type(doc.listest) == numpy.ndarray
239          #assert doc.listest.type() == numpy.bool_          assert doc.listest.dtype == numpy.bool_
240          #assert len(doc.listest) == len(mylist)          assert len(doc.listest) == len(mylist)
241          #assert min([ mylist[i] == doc.listest[i] for i in range(len( doc.listest)) ])          assert min([ mylist[i] == doc.listest[i] for i in range(len( doc.listest)) ])
242    
243      def testIntLists(self):      def testIntLists(self):
244          p4 = ParameterSet()          p4 = ParameterSet()
# Line 307  class ModeltoDomTestCase(unittest.TestCa Line 307  class ModeltoDomTestCase(unittest.TestCa
307    
308      def testModelExists(self):      def testModelExists(self):
309          modeldoc = self._class()          modeldoc = self._class()
310          assert (isinstance, (modeldoc, Model))          assert isinstance(modeldoc, Model)
311          assert self._dom().getElementsByTagName("Model")          assert self._dom().getElementsByTagName("Model")
312            
313      def testModelhasID(self):      def testModelhasID(self):

Legend:
Removed from v.2455  
changed lines
  Added in v.2468

  ViewVC Help
Powered by ViewVC 1.1.26