[PATCH 1 of 2 v2] tests: move pytest settings from kallithea/tests/pytest.ini to setup.cfg

Mads Kiilerich mads at kiilerich.com
Fri May 15 18:50:14 EDT 2015


On 05/14/2015 09:47 PM, Thomas De Schampheleire wrote:
> # HG changeset patch
> # User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
> # Date 1431630347 -7200
> #      Thu May 14 21:05:47 2015 +0200
> # Node ID 6a7b32b3fdc09d515dc68c347b60e9d8d07a1a5e
> # Parent  1446e9c945e802ed9288a9e091343d6a2bb02e9b
> tests: move pytest settings from kallithea/tests/pytest.ini to setup.cfg
>
> pytest only uses one configuration file and does not merge settings from
> multiple files [1]. The first detected file is setup.cfg thus should contain
> all relevant configuration.
>
> [1] http://pytest.org/latest/customize.html#initialization-determining-rootdir-and-inifile
>
> diff --git a/kallithea/tests/pytest.ini b/kallithea/tests/pytest.ini
> deleted file mode 100644
> --- a/kallithea/tests/pytest.ini
> +++ /dev/null
> @@ -1,7 +0,0 @@
> -[pytest]
> -addopts =
> -    # --verbose
> -    # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings.
> -    -rfEsxXw
> -    # Shorter scrollbacks; less stuff to scroll through
> -    --tb=short
> diff --git a/setup.cfg b/setup.cfg
> --- a/setup.cfg
> +++ b/setup.cfg
> @@ -13,6 +13,12 @@ nologcapture = 1
>   [pytest]
>   # only look for tests in kallithea/tests
>   python_files = kallithea/tests/**/test_*.py
> +addopts =
> +    # --verbose
> +    # show extra test summary info as specified by chars (f)ailed, (E)error, (s)skipped, (x)failed, (X)passed, (w)warnings.
> +    -rfEsxXw
> +    # Shorter scrollbacks; less stuff to scroll through
> +    --tb=short
>   
>   [compile_catalog]
>   domain = kallithea

With this, I get:

============================================================================================= 
short test summary info 
=============================================================================================
SKIP [1] 
/home/madski/kallithea-venv/lib/python2.7/site-packages/_pytest/unittest.py:114: 
not implemented
SKIP [1] 
/home/madski/kallithea-venv/lib/python2.7/site-packages/_pytest/unittest.py:114: 
skipped due to existing index

==================================================================================== 
1594 passed, 2 skipped in 189.09 seconds 
=====================================================================================

Is this expected?

The messages are ok but the file and line numbers are not helpful.

/Mads


More information about the kallithea-general mailing list