assertraises

assertRaises just catches base exception

I'm running into a strange problem when using unittest.assertRaises. When executing the code below I get the following output: E ====================================================================== ERROR: testAssertRaises (__main__.Test) ---------------------------------------------------------------------- Traceback (most recent call...

A problem with assertRaises function in Python

Hello,guys! I am trying to run the following test self.assertRaises(Exception,lambda: unit_test.testBasic()) where test.testBasic() is class IsPrimeTest(unittest.TestCase): def assertRaises(self,exception,callable,*args,**kwargs): print('dfdf') temp = callable super().assertRaises(exception,temp,*ar...