Making pytest the standard test suite (instead of nose)

Thomas De Schampheleire patrickdepinguin at
Tue Jun 2 12:34:32 EDT 2015

On June 2, 2015 4:10:19 PM CEST, Brianna Laugher <brianna.laugher at> wrote:
>On 31 May 2015 at 12:57, Thomas De Schampheleire
><patrickdepinguin at
>> wrote:
>> Hi,
>> I've been using pytest for a while now, and think we should consider
>> making it the default test suite instead of nose.
>> As I see it, there are following points to do:
>> 1. silence the database setup code by default. Currently, the initial
>> step of the tests sets up the database and all commands are passing
>> on the terminal. This should be silent, just like with nose.
>> However, I don't know how to fix this correctly, and I hope Marc,
>> Ronny or Brianna could help here.
>So I downloaded kallithea and had a bit of a poke around. My impression
>that the database setup is done in kallithea/tests/
>pytest_configure, specifically loadapp. While under nosetests, more or
>the same is done at pylons.tests PylonsPlugin.begin. So I think the
>nose plugin is suppressing all output (and in fact I couldn't make it
>deliberately show me the output).

IIRC, 'nosetests -s' shows that output.

>Whereas with pytest, I think it is not expecting test setup to be done
>pytest_configure, and so the options for controlling output have no
>on what happens in this function.
>So 1) Maybe pytest should be changed to allow suppression of output
>or 2) Maybe this functionality belongs under a different hook function.

Any hook is fine for us, as long as it works and we can hide the output of the setup code. :)

>With pytest style fixtures I don't think it would be a problem. However
>maybe there still would need to be something at this level, I don't
>understand the implications of what is written here re nosetest, maybe
>same problems would occur with pytest.

I have no idea about this, I guess it needs to be tried to know for sure.

Thanks for looking at this!

Best regards,

More information about the kallithea-general mailing list