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

Thomas De Schampheleire patrickdepinguin at gmail.com
Thu May 14 15:47:43 EDT 2015


# 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


More information about the kallithea-general mailing list