Louie Lu added the comment:
I'm successful to add a sub.expectedFailure() to subTest, but in current API,
it isn't that will done.
First, you will not get any alarm or information that there is a test been
treat as "expected failure" at the result text.
Second, it just act like you putting @
Ronald Oussoren added the comment:
That's correct, I have a test like:
def test_something(self):
for info in CASES:
with self.subTest(info):
self.assert_something(info)
For some values of 'info' the test is known to fail and I want to mark those as
exptectedFailure someh
Louie Lu added the comment:
There is a mailing-list discusss this before:
https://mail.python.org/pipermail/python-list/2016-June/710575.html
But after checking, current subTest contextmanager won't yield subtest, so the
method of with self.subTest() as sub won't work.
Another problem is, in
Louie Lu added the comment:
So for example:
for i in range(10):
with self.subTest(i=i):
DoSomething(i)
we have some platform specific in i=8, i=9, and you want to labeled as
expectedFailure. Do I miss something?
--
nosy: +louielu
_
New submission from Ronald Oussoren:
It would be nice if there were a way to mark a TestCase.subTest as an expected
failure.
I have a number of testcases that use the subTest feature and where a small
subset of those tests are expected failures due to platform issues. It would be
nice if it w