jeudi 4 février 2016

Change the name of py.test tests

I'm interested in migrating my test suite from using nose to using py.test. I don't like the test names printed by py.test in the test failure summary, because they don't include the file name of the test. I do really like the test names that py.test uses for to print progress in verbose mode.

For example:

[dbw tests]$ py.test -sv r_group/test_meta_analysis/test_meta_analysis.py::_TestPanel::testDisplaySummary
==================================== test session starts ===============================
collected 3 items

r_group/test_meta_analysis/test_meta_analysis.py::_TestPanel::testDisplaySummary FAILED

========================================= FAILURES =====================================
_______________________________ _TestPanel.testDisplaySummary __________________________

This is pretty important to me because I have ~40K tests, and the short name "_TestPanel.testDisplaySummary" is not helpful to me in quickly finding the test I want.

Aucun commentaire:

Enregistrer un commentaire