You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
document and/or change display of parametrization values in IDs #249
There are some values of a parametrized argument that py.test seems unable to print to terminal during reports (or to file with --reportlog) - so far I have encountered it with UTF-8 content and the value None.
In the test report, it prints an internal identifier ('param6' for example).
Support for custom IDs has been improved in the last year or so. And these all seem OK now.
@pytest.mark.parametrize('a', ['test', u'Стоял он, дум великих полн', '<h1>HTML string</h1>', None, False,True,''])deftest_params(a):
print(a)
Output:
testing/test_foo.py::test_params[test] test
PASSED
testing/test_foo.py::test_params[Стоял он, дум великих полн] Стоял он, дум великих полн
PASSED
testing/test_foo.py::test_params[<h1>HTML string</h1>] <h1>HTML string</h1>
PASSED
testing/test_foo.py::test_params[None] None
PASSED
testing/test_foo.py::test_params[False] False
PASSED
testing/test_foo.py::test_params[True] True
PASSED
testing/test_foo.py::test_params[]
PASSED
Activity
pfctdayelise commentedon Jul 25, 2015
Support for custom IDs has been improved in the last year or so. And these all seem OK now.
Output:
Add --pyi and --py36 flags (pytest-dev#249)