class MyTest(unittest.TestCase):
self.failUnless(False, 'first')
self.failIf(False, 'second')
def suite():
theSuite = unittest.makeSuite(MyTest, 'test')
return theSuite;
unittest.TextTestRunner().run(suite())
F.
======================================================================
FAIL: testFirst (__main__.MyTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "unittesterror.py", line 7, in testFirst
self.failUnless(False, 'first')
AssertionError: first
Ran 2 tests in 0.000s
F.
======================================================================
FAIL: testFirst (__main__.MyTest)
----------------------------------------------------------------------
<type 'AssertionError'>: IronPython.Runtime.PythonAssertionError: AssertionError
at IronPython.Runtime.Ops.Raise(Object type, Object value, Object traceback)
at unittest.failUnless$f32(Object self, Object expr, Object msg) in c:\Python24\Lib\unittest.py:line 309
at IronPython.Runtime.Function3.Call(Object arg0, Object arg1, Object arg2)
at IronPython.Runtime.Ops.Call(Object func, Object arg0, Object arg1, Object arg2)
at IronPython.Runtime.Method.Call(Object arg0, Object arg1)
at IronPython.Runtime.Ops.CallWithContext(ICallerContext context, Object func, Object arg0, Object arg1)
at __main__.testFirst$f0(Object self) in c:\usr\home\jonesl\Employee\Current\ProductDir\ResearchAndDevelopment\als_security\p
roto_azn\unittesterror.py:line 7
at IronPython.Runtime.Function1.Call(Object arg0)
at IronPython.Runtime.Ops.Call(Object func, Object arg0)
at IronPython.Runtime.Method.Call()
at IronPython.Runtime.Ops.CallWithContext(ICallerContext context, Object func)
at unittest.run$f26(Object self, Object result) in c:\Python24\Lib\unittest.py:line 260
Ran 2 tests in 0.172s
|
-- Lawrence Allan Jones |
![]() |
This e-mail and any attachments are intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified any dissemination, distribution or copying of this email, and any attachments thereto, is strictly prohibited. If you receive this email in error please immediately notify the sender and permanently delete the original copy and any copy of any e-mail, and any printout thereof.
_______________________________________________ users mailing list [email protected] http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

