/[escript]/trunk/escriptcore/test/python/run_symbolic.py
ViewVC logotype

Diff of /trunk/escriptcore/test/python/run_symbolic.py

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

revision 4657 by jfenwick, Thu Feb 6 06:12:20 2014 UTC revision 4781 by jduplessis, Thu Mar 20 04:57:07 2014 UTC
# Line 8586  class SymbolicTestCase(unittest.TestCase Line 8586  class SymbolicTestCase(unittest.TestCase
8586          res=Evaluator(z)(x=xx,y=yy)          res=Evaluator(z)(x=xx,y=yy)
8587          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")          self.assertAlmostEqual(Lsup(res-ref), 0.0, self.TOL_DIGITS, "wrong result")
8588    
8589        def test_subs(self):
8590            #tests for preservation of data substitution
8591            u=Symbol('u',(2,))
8592            a=Symbol('a',(2,))
8593            dat=Data([1,0],FunctionSpace())
8594            dat2=Data([0,1],FunctionSpace())
8595            u=u.subs(u,dat)
8596            a=a.subs(a,dat2)
8597            a[0]=u[0]
8598            self.assertEqual(u._subs, u[0]._subs, "indexing did not preserve data substitution")
8599            self.assertTrue(a[0]._subs.has_key(u[0]._subs.keys()[0]), "indexing did not preserve data substitution")
8600    
8601  if __name__ == "__main__":  if __name__ == "__main__":
8602      import sys      import sys

Legend:
Removed from v.4657  
changed lines
  Added in v.4781

  ViewVC Help
Powered by ViewVC 1.1.26