Hi,
I have the following statement in my test :
self.assertRais es(CDKeyExcepti on, ValidationObjec t.Validate,
1001,'NonExista ntKey')
and the test fails as if assertRaises was not catching the thrown
exception:
=============== =============== =============== =============== ==========
ERROR: test (DBLookupValida tionTests.DBLoo kupValidationTe sts)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\Dev\jade.r1 2sp\src\RVPacka ges\CDKey\Serve r\DBLookupValid ationTests.py",
line 64, in test
self.assertRais es(CDKeyExcepti on, ValidationObjec t.Validate,
1001,'NonExista ntKey')
File "C:\tools\Pytho n\lib\unittest. py", line 320, in failUnlessRaise s
callableObj(*ar gs, **kwargs)
File
"C:\Dev\jade.r1 2sp\src/Services/local/Home\Scripts/system\CDKey\DB LookupValidatio n.py",
line 69, in Validate
raise CDKeyException, self.logger.err or(e) CDKeyException
Any idea what is happening?
Thanks,
Olivier Langlois
I have the following statement in my test :
self.assertRais es(CDKeyExcepti on, ValidationObjec t.Validate,
1001,'NonExista ntKey')
and the test fails as if assertRaises was not catching the thrown
exception:
=============== =============== =============== =============== ==========
ERROR: test (DBLookupValida tionTests.DBLoo kupValidationTe sts)
----------------------------------------------------------------------
Traceback (most recent call last):
File
"C:\Dev\jade.r1 2sp\src\RVPacka ges\CDKey\Serve r\DBLookupValid ationTests.py",
line 64, in test
self.assertRais es(CDKeyExcepti on, ValidationObjec t.Validate,
1001,'NonExista ntKey')
File "C:\tools\Pytho n\lib\unittest. py", line 320, in failUnlessRaise s
callableObj(*ar gs, **kwargs)
File
"C:\Dev\jade.r1 2sp\src/Services/local/Home\Scripts/system\CDKey\DB LookupValidatio n.py",
line 69, in Validate
raise CDKeyException, self.logger.err or(e) CDKeyException
Any idea what is happening?
Thanks,
Olivier Langlois
Comment