This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author zach.ware
Recipients ezio.melotti, martin.panter, michael.foord, pitrou, rbcollins, zach.ware
Date 2015-12-17.08:05:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In-reply-to <>
Martin Panter added the comment:
> Okay, so you have a test with subtests. You have presented three cases:
> 1. Single subtest which passes. No problem I assume.

Or several subtests which pass.  No problems.

> 2. Two subtests: 1st fails, 2nd passes. This is how subtests are normally used, so I guess there is no problem. Is that right?

Any of multiple subtests fail, and there is no indication in the
"summary line" (the line that is usually "..........................",
a dot for each successful test).  When a a regular test fails, an F
(or an E, if the raised exception was anything but
self.failureException) is added to the line; when any subtests fail,
nothing is added.  If you have 10 tests methods that use subtests, and
any subtest in each method fails, your summary line will be blank.  In
verbose mode, you'd get "test_one ... test_two ... test_three ... ..."
(note lack of newlines) instead of the expected "test_one ...
FAILURE\ntest_two ... FAILURE\ntest_three ... FAILURE\n..." (note the

> 3. After two subtests have already run (one of which failed), SkipTest is raised. I guess you want the test results to be reported better in this case.
> What is the use case? Why not skip the test before any subtests are started?

Only the subtest is skipped (which should be valid, or documented as
not valid), and the order of the subtests doesn't matter:

$ tests=210 ./python.exe -v
test_subTest (__main__.TestClass) ... skipped 'skipped'

FAIL: test_subTest (__main__.TestClass) (<subtest>)
Traceback (most recent call last):
  File "", line 14, in test_subTest
AssertionError: 0 is not true

Ran 1 test in 0.001s

FAILED (failures=1, skipped=1)

But, the summary makes it seem as though the entire test was skipped.

Hopefully this makes it a bit clearer :)
Date User Action Args
2015-12-17 08:05:27zach.waresetrecipients: + zach.ware, pitrou, rbcollins, ezio.melotti, michael.foord, martin.panter
2015-12-17 08:05:27zach.warelinkissue25894 messages
2015-12-17 08:05:26zach.warecreate