Hi Brianna, all,

I am thinking about constructing ids for parametrized tests using
argname/valindex, i.e. not use the actual parametrization
values.  The latter causes some problems (among them also issue357)
and generally doesn't allow to distinguish the two tests in:

    @pytest.mark.parametrize("arg", [1,1])
    def test_some(arg):
        pass

Currently this gives two identical test ids "test_some[1]".
With the new scheme this gives:

    test_some[arg0]
    test_some[arg1]

Such a scheme would guarantee unique IDs.  The scheme is already
used for user instances.

Note that when you get a traceback you would still see the actual
argument values in the traceback.

Any objections?

holger
_______________________________________________
Pytest-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pytest-dev

Reply via email to