[py-dev] How to run a given test by name?

Baptiste Lepilleur baptiste.lepilleur at gmail.com
Sun May 1 12:08:16 CEST 2011


Hi,

typically when troubleshooting multiple test failures, I want to be able to
run a single parametrized test case.

How can you tell py.test to run only tests matching a specific name.

For example, I'd like to be able to run:

py.test src --filter-by-name "test_mandatory_property[ZText]"

This would run all tests with a name
matching "test_mandatory_property[ZText]".

Is there a way to do that?

Baptiste.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20110501/06d643bf/attachment.html>


More information about the Pytest-dev mailing list