Author pitrou
Recipients Julian, Yaroslav.Halchenko, abingham, bfroehle, borja.ruiz, brian.curtin, chris.jerdonek, eric.araujo, eric.snow, exarkun, ezio.melotti, florian-rathgeber, fperez, hpk, michael.foord, nchauvat, ncoghlan, pitrou, r.david.murray, santoso.wijaya, serhiy.storchaka, spiv
Date 2013-01-19.00:52:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1358556573.3462.7.camel@localhost.localdomain>
In-reply-to <1358555610.83.0.527134617854.issue16997@psf.upfronthosting.co.za>
Content
Le samedi 19 janvier 2013 à 00:33 +0000, Chris Jerdonek a écrit :
> With the way I understand it, it seems like a subtest failure should
> register as a failure of the TestCase as a whole, unless the subtests
> should be enumerated and considered tests in their own right (in which
> case the total test count should reflect this).

It does register as a failure of the TestCase as a whole. Simply, a test
case can encounter several failures: for example, one in the test method
and one in the tearDown method.

Perhaps unittest should be made to show better reporting, e.g. show the
number of successful and failed tests. I suppose there is a reason for
the current behaviour, though.

> This results in:
> 
>     Ran 1 test in 0.001s
> 
>     FAILED (failures=1, unexpected successes=1)
> 
> In other words, it seems like the decorator is being applied to each
> subtest as opposed to the test case as a whole (though actually, I
> think the first should read "expected failures=1").  It seems like one
> subtest failing should qualify as an expected failure, or are the
> semantics such that expectedFailure means that every subtest must
> fail?

I don't know. I never use expectedFailure. There doesn't seem to be any
obviously preferable answer here.
History
Date User Action Args
2013-01-19 00:52:04pitrousetrecipients: + pitrou, spiv, exarkun, ncoghlan, ezio.melotti, eric.araujo, r.david.murray, michael.foord, brian.curtin, hpk, fperez, chris.jerdonek, Yaroslav.Halchenko, santoso.wijaya, nchauvat, florian-rathgeber, Julian, abingham, eric.snow, serhiy.storchaka, borja.ruiz, bfroehle
2013-01-19 00:52:04pitroulinkissue16997 messages
2013-01-19 00:52:04pitroucreate