Message180234
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. |
|
Date |
User |
Action |
Args |
2013-01-19 00:52:04 | pitrou | set | recipients:
+ pitrou, spiv, exarkun, ncoghlan, ezio.melotti, eric.araujo, r.david.murray, michael.foord, brian.curtin, hpk, fperez, chris.jerdonek, Yaroslav.Halchenko, santoso.wijaya, nchauvat, kynan, Julian, abingham, eric.snow, serhiy.storchaka, borja.ruiz, bfroehle |
2013-01-19 00:52:04 | pitrou | link | issue16997 messages |
2013-01-19 00:52:04 | pitrou | create | |
|