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 p-ganssle
Recipients ezio.melotti, michael.foord, p-ganssle, rbcollins
Date 2018-11-27.15:29:44
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1543332585.01.0.788709270274.issue35327@psf.upfronthosting.co.za>
In-reply-to
Content
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')
        assert i == 1

    @pytest.mark.parametrize("i", range(1, 3))
    def test_something_else(i):
        assert 3 > i >= 1


Running `pytest -v` for this gives:


======================================= test session starts ========================================
platform linux -- Python 3.7.1, pytest-4.0.1, py-1.7.0, pluggy-0.8.0
cachedir: .pytest_cache
rootdir: /tmp/test_mod, inifile:
collected 4 items                                                                                  

test_mod.py::test_something[1] PASSED                                                        [ 25%]
test_mod.py::test_something[2] SKIPPED                                                       [ 50%]
test_mod.py::test_something_else[1] PASSED                                                   [ 75%]
test_mod.py::test_something_else[2] PASSED                                                   [100%]

=============================== 3 passed, 1 skipped in 0.01 seconds ================================
History
Date User Action Args
2018-11-27 15:29:45p-gansslesetrecipients: + p-ganssle, rbcollins, ezio.melotti, michael.foord
2018-11-27 15:29:45p-gansslesetmessageid: <1543332585.01.0.788709270274.issue35327@psf.upfronthosting.co.za>
2018-11-27 15:29:45p-gansslelinkissue35327 messages
2018-11-27 15:29:44p-gansslecreate