/[ascend]/trunk/test.py
ViewVC logotype

Diff of /trunk/test.py

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

revision 1034 by johnpye, Thu Jan 4 05:37:55 2007 UTC revision 1035 by johnpye, Thu Jan 4 07:35:22 2007 UTC
# Line 259  class TestBlackBox(AscendSelfTester): Line 259  class TestBlackBox(AscendSelfTester):
259      def testfail1(self):      def testfail1(self):
260          """Mismatched arg counts check-- tests bbox, not ascend."""          """Mismatched arg counts check-- tests bbox, not ascend."""
261          self.L.load('test/blackbox/fail1.a4c')          self.L.load('test/blackbox/fail1.a4c')
         M = self.L.findType('fail1').getSimulation('sim')  
262          try:          try:
263              M.solve(ascpy.Solver("QRSlv"),ascpy.SolverReporter())              M = self.L.findType('fail1').getSimulation('sim')
264              self.fail("expected exception was not raised")              self.fail("expected exception was not raised")
265          except RuntimeError,e:          except RuntimeError,e:
266              print "Caught exception '%s', assumed ok" % e              print "Caught exception '%s', assumed ok" % e
# Line 269  class TestBlackBox(AscendSelfTester): Line 268  class TestBlackBox(AscendSelfTester):
268      def testfail2(self):      def testfail2(self):
269          """Incorrect data arg check -- tests bbox, not ascend"""          """Incorrect data arg check -- tests bbox, not ascend"""
270          self.L.load('test/blackbox/fail2.a4c')          self.L.load('test/blackbox/fail2.a4c')
271          M = self.L.findType('fail2').getSimulation('sim')          try:
272          M.solve(ascpy.Solver("QRSlv"),ascpy.SolverReporter())              M = self.L.findType('fail2').getSimulation('sim')
273                self.fail("expected exception was not raised")
274            except RuntimeError,e:
275                print "Caught exception '%s', assumed ok (should mention errors during instantiation)" % e
276    
277      def testpass1(self):      def testpass1(self):
278          """simple single bbox forward solve"""          """simple single bbox forward solve"""

Legend:
Removed from v.1034  
changed lines
  Added in v.1035

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22