Dynamic pytest method generation with only custom name
<p>Hi I am trying the followign example mentioned in pytest doc,</p>

<pre><code># content of test_expectation.py
@pytest.mark.parametrize("test_input,expected", [
("3+5", 8),
("2+4", 6),
("6*9", 42),
])
def test_eval(test_input, expected):
    assert eval(test_input) == expected
</code></pre>

<p>When i run using py.test -v it gives me the output as below,</p>

<pre><code>test_code.py::test_eval[3+5-8] PASSED
test_code.py::test_eval[2+4-6] PASSED
test_code.py::test_eval[6*9-42] FAILED
</code></pre>

<p>Here when I generate html reports the names are too long when I use very long input data.</p>

<p>In above example lest take 1st result the name of method is [3+5-8]. i.e its taken the tuple (3+5,8) and attached it to the actual test case method name.</p>

<p>Now In my case the tuple is ("short name", "very long string") instead of (3+5,8) so In my html report is showing very long. Is it possible to show only the "short name" and not the 2nd value?</p>