[PATCH] tests: restrict pytest test collection to kallithea/tests

Mads Kiilerich mads at kiilerich.com
Wed May 13 15:34:19 EDT 2015


On 05/13/2015 09:26 PM, Thomas De Schampheleire wrote:
> # HG changeset patch
> # User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
> # Date 1431544206 -7200
> #      Wed May 13 21:10:06 2015 +0200
> # Node ID edce9d365e2d6711e1336ee58a1b20520d8283ae
> # Parent  e19127e4040d1817bbec77118ca7377644f76a64
> tests: restrict pytest test collection to kallithea/tests
>
> When the kallithea root directory contains a populated virtualenv, pytest
> would also collect tests in python packages installed there.
>
> Restrict the tests to be considered to any test_*.py file inside
> kallithea/tests. With this change, the 'norecursedirs' value of .* and
> *.egg are no longer relevant.

Marc, do you agree with this?

Should we also just rename the test_ files in the scripts folder and get 
rid of the norecurse option?

/Mads

>
> diff --git a/setup.cfg b/setup.cfg
> --- a/setup.cfg
> +++ b/setup.cfg
> @@ -11,7 +11,8 @@ detailed-errors = 1
>   nologcapture = 1
>   
>   [pytest]
> -norecursedirs = .* *.egg kallithea/tests/scripts
> +norecursedirs = kallithea/tests/scripts
> +python_files = kallithea/tests/**/test_*.py
>   
>   [compile_catalog]
>   domain = kallithea



More information about the kallithea-general mailing list