On 18/02/2015 20:40, Ben Finney wrote:
Sydney Shall writes:
My test code is the following:
def test_func_getSurplusLabourTime_Exc(self):
self.assertRaises(ValueError,self.cwp.getSurplusLabourTime(self.cwp.ww,self.cwp.uvc))
[This last line should indented, but it refuses to do so!]
What is
Sydney Shall writes:
> My test code is the following:
>
> def test_func_getSurplusLabourTime_Exc(self):
>
> self.assertRaises(ValueError,self.cwp.getSurplusLabourTime(self.cwp.ww,self.cwp.uvc))
>
>
> [This last line should indented, but it refuses to do so!]
What is “it” which refuses to inden
Hi,
When using self.assertRaises like this you should pass a callable (the
function you are going to call), but not call the function on the test. The
problem is when the function takes arguments. At this point you need to
create a callable with the two arguments. That can be done with functools
b