/[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 874 by elspeth, Tue Oct 17 12:06:11 2006 UTC revision 875 by elspeth, Tue Oct 17 12:42:47 2006 UTC
# Line 8  __license__="""Licensed under the Open S Line 8  __license__="""Licensed under the Open S
8               http://www.opensource.org/licenses/osl-3.0.php"""               http://www.opensource.org/licenses/osl-3.0.php"""
9    
10  import unittest  import unittest
11  from esys.escript.modelframe import Model,Link,Simulation,ParameterSet,parse  from esys.escript.modelframe import Model,Link,Simulation,ParameterSet,parse,DataSource
12  import math  import math
13  from cStringIO import StringIO  from cStringIO import StringIO
14  from xml.dom import minidom  from xml.dom import minidom
# Line 217  class ParamaterSetTestCase(unittest.Test Line 217  class ParamaterSetTestCase(unittest.Test
217          self.assertEquals(mylist, doc.listest)          self.assertEquals(mylist, doc.listest)
218          assert type(doc.listest[0]) == bool          assert type(doc.listest[0]) == bool
219                    
220        def testDatasource(self):
221            p5 = ParameterSet()
222            myURI = DataSource("somelocalfile.txt", "text")
223            p5.declareParameter(uritest=myURI)
224            doc = self._class(p5)
225            self.assertEquals(myURI.uri, doc.uritest.uri)
226            self.assertEquals(myURI.fileformat, doc.uritest.fileformat)
227            assert type(doc.uritest) == DataSource
228                    
229    
230          
231  class ModeltoDomTestCase(unittest.TestCase):  class ModeltoDomTestCase(unittest.TestCase):
232            
233      def _class(self):      def _class(self):

Legend:
Removed from v.874  
changed lines
  Added in v.875

  ViewVC Help
Powered by ViewVC 1.1.26