[pytest-dev] More flexibility on test function naming conventions

Dj Gilcrease digitalxero at gmail.com
Fri Jan 8 16:49:00 EST 2016


You may also want to look at

https://github.com/pytest-dev/pytest-bdd



On Fri, Jan 8, 2016 at 9:47 AM Raphael Pierzina <raphael at hackebrot.de>
wrote:

> Hi Ernesto,
>
> maybe this is what you are looking for
> https://pytest.org/latest/customize.html#confval-python_functions
>
> hth
> Raphael
>
> On 08 Jan 2016, at 17:30, Ernesto D. Luzon Jr. <edluzonjr at gmail.com>
> wrote:
>
> Hi All,
>
> Is there a way to specify multiple naming conventions for test functions?
>
> For example, in my pytest.ini, I would like:
>
> [pytest]
> python_functions=[given, when, then, and, but]
>
>
> Then pytest can discover functions such as:
>
> def given_iam_an_author(): pass
> def and_i_wrote_an_article(): pass
> def when_i_do_this(): pass
> def then_result_is_good(): pass
>
> If this functionality doesn't exist yet, any hint on which pytest code I
> can play with to experiment on this?
>
> Many thanks,
> Ernesto D. Luzon Jr.
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
>
>
> _______________________________________________
> pytest-dev mailing list
> pytest-dev at python.org
> https://mail.python.org/mailman/listinfo/pytest-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20160108/31687af5/attachment.html>


More information about the pytest-dev mailing list