[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-30 Thread Martin Panter
Martin Panter added the comment: Sounds very similar to Issue 25894, discussing how to deal with tests where different subtests errored, failed, skipped and passed. -- nosy: +martin.panter ___ Python tracker __

[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: I think this is a nice output, taking a quick look at unittest source, all the information needed to display this is save in the TestResult object, showing skipped tests is done here: https://github.com/python/cpython/blob/master/Lib/unittest/runner.py#L85 It

[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Paul Ganssle
Paul Ganssle added the comment: @Rémi Interesting. Your suggested output does look clearer than the existing one, but it still doesn't indicate that anything *passed*. I think I like the way pytest does it the best, but if we can't expose the subtests as separate tests, I'd probably want it t

[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Rémi Lapeyre
Rémi Lapeyre added the comment: Did you notice that `skipped 'Not supported'` will be displayed once per skipped subtest so changing your `for i in range(1, 3):` by `for i in range(1, 5):` will show: python3 -m unittest -v test_something (test2.SomeTest) ... skipped 'Not supported'

[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Paul Ganssle
Paul Ganssle added the comment: As "prior art" the way that pytest does this is to have parametrized tests show up as separate tests: import pytest @pytest.mark.parametrize("i", range(1, 3)) def test_something(i): if i > 1: pytest.skip('Not supported')

[issue35327] Using skipTest with subTest gives a misleading UI.

2018-11-27 Thread Paul Ganssle
New submission from Paul Ganssle : It seems that if you call skipTest *anywhere* in a test function, even in a subTest, the *entire* function gets marked as "skipped", even if only one sub-test is skipped. Example: import unittest class SomeTest(unittest.TestCase): def test_