From: Ed P. -S. N. S. D. <epe...@ea...> - 2001-09-14 19:12:04
|
Hi, I'm trying to execute a Junit framework test using java reflection for test method invocation. I see an error when running the following test a Solaris 5.8 platform, with JDK 1.3.1, jython 2.1.a1, and junit 3.7. The test runs successfully on a Windows 2000 platform with the same versions of JDK, jython, and junit. I'm curious why I'm seeing a difference. ------------ MathTest test -------------- class MathTest(TestCase): def __init__(self,name): self.fvalue1=2.0 self.fvalue2=3.0 TestCase.__init__(self,name) def setUp(self): self.fvalue1=2.0 self.fvalue2=4.0 def testAdd(self): result=self.fvalue1 + self.fvalue2 print "result: %d" % (result) assert(result == 6.0) def pfail(): mt=MathTest('MathTest.testAdd') result=mt.run() for f in result.failures(): print f ------------ end MathTest file ----- jython -i MathTest.py pfail() MathTest.testAdd(org.python.proxies.__main__$MathTest$0): Method "MathTest.testAdd" not found Any help would be appreciated, Ed Perkins |