ok...thanks for the info. I have no problem changing it.
thanks,
ginnie
On 02/ 9/11 06:14 PM, Keith Mitchell wrote:
92: What purpose does this line serve?
94: Would it be more helpful to call assertTrue(False) with the
message/info from the received exception, or perhaps just let the
raised exception percolate up?
If the execute command succeeds, then the test will succeed, if it
fails, then line 94 will cause the test to fail. assertTrue verifies
that the function call returned successfully or not. I not really
testing whether or not a particular exception is raised.
Two points: First, a nit, use "self.fail()" rather than
"self.assertTrue(False)". Second, I concur with Jack that, if the test
fails, displaying the exception will help whoever's diagnosing the
problem find the cause faster, so I'd suggest changing this to:
except Exception as e:
self.fail(str(e))
Also note that line 92 isn't really necessary - a test doesn't
necessarily *have* to have any assertions in it. That is, a test is
successful if no assertions fail; which may mean that no assertions
were run.
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss