Re: Tests -- Errors vs. Failures

2013-07-08 Thread Aymeric Augustin
I'm in favor of the second version because the first one hides the stack trace. `self.fail` is almost always the wrong answer, because the actual failure happened earlier in the test! I usually include a comment like "# this should not raise an exception" in such tests to explain why they don't

Re: Tests -- Errors vs. Failures

2013-07-08 Thread Carl Meyer
Hi Shai, On 07/08/2013 02:55 PM, Shai Berger wrote: > I just pushed a fix to a test failure on Oracle -- the last-executed-query > test. However, I want to ask about the preferred style in writing the test > itself. The test, as it is written now, is: > > def test_last_executed_query(self):

Tests -- Errors vs. Failures

2013-07-08 Thread Shai Berger
Hi all, I just pushed a fix to a test failure on Oracle -- the last-executed-query test. However, I want to ask about the preferred style in writing the test itself. The test, as it is written now, is: def test_last_executed_query(self): """ last_executed_query should not ra