有时pytest -vvv
在失败报告的顶部显示参数值,如下所示,但有时不显示。当它不是自动发生时,如何使它显示参数值?
=================================================================== FAILURES ===================================================================
_____________________________________________________________ test_person[person0] _____________________________________________________________
person = Person(name='Alice', hobbies=[Hobby(title='hacking')])
@pytest.mark.parametrize("person", PERSONS)
def test_person(person):
> assert person == 'foo'
E AssertionError: assert Person(name='Alice', hobbies=[Hobby(title='hacking')]) == 'foo'
../../tmp/ids.py:25: AssertionError