diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -16,6 +16,7 @@ syntax: regexp ^docs/build/ ^docs/_build/ ^data$ +^kallithea/tests/data$ ^sql_dumps/ ^\.settings$ ^\.project$ diff --git a/MANIFEST.in b/MANIFEST.in --- a/MANIFEST.in +++ b/MANIFEST.in @@ -17,5 +17,5 @@ recursive-include kallithea/public * recursive-include kallithea/templates * recursive-include kallithea/tests/fixtures * recursive-include kallithea/tests/scripts * +include kallithea/tests/test.ini include kallithea/tests/vcs/aconfig -include test.ini diff --git a/docs/contributing.rst b/docs/contributing.rst --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -50,13 +50,13 @@ After finishing your changes make sure a the testsuite running ``nosetests`` from the project root, or if you use tox run ``tox`` for python2.6-2.7 with multiple database test. -When using `nosetests`, the `test.ini` file is used with an SQLite database. Edit -this file to change your testing enviroment. +When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the +SQLite database specified there. It is possible to avoid recreating the full test database on each invocation of the tests, thus eliminating the initial delay. To achieve this, run the tests as:: - paster serve test.ini --pid-file=test.pid --daemon + paster serve kallithea/tests/test.ini --pid-file=test.pid --daemon KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests kill -9 $(cat test.pid) diff --git a/kallithea/i18n/how_to b/kallithea/i18n/how_to --- a/kallithea/i18n/how_to +++ b/kallithea/i18n/how_to @@ -83,7 +83,7 @@ new translation instructions Testing translations -------------------- -Edit test.ini file and set lang attribute to:: +Edit kallithea/tests/test.ini file and set lang attribute to:: lang= diff --git a/kallithea/tests/conftest.py b/kallithea/tests/conftest.py --- a/kallithea/tests/conftest.py +++ b/kallithea/tests/conftest.py @@ -15,7 +15,7 @@ def pytest_configure(): # Disable INFO logging of test database creation, restore with NOTSET logging.disable(logging.INFO) - pylons.test.pylonsapp = loadapp('config:test.ini', relative_to=path) + pylons.test.pylonsapp = loadapp('config:kallithea/tests/test.ini', relative_to=path) logging.disable(logging.NOTSET) # Setup the config and app_globals, only works if we can get diff --git a/kallithea/tests/other/manual_test_vcs_operations.py b/kallithea/tests/other/manual_test_vcs_operations.py --- a/kallithea/tests/other/manual_test_vcs_operations.py +++ b/kallithea/tests/other/manual_test_vcs_operations.py @@ -18,7 +18,7 @@ kallithea.tests.other.manual_test_vcs_op Test suite for making push/pull operations. Run it in two terminals:: - paster serve test.ini + paster serve kallithea/tests/test.ini KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 nosetests kallithea/tests/other/manual_test_vcs_operations.py You must have git > 1.8.1 for tests to work fine diff --git a/test.ini b/kallithea/tests/test.ini rename from test.ini rename to kallithea/tests/test.ini diff --git a/setup.cfg b/setup.cfg --- a/setup.cfg +++ b/setup.cfg @@ -6,7 +6,7 @@ tag_date = 0 [nosetests] verbose = True verbosity = 2 -with-pylons = test.ini +with-pylons = kallithea/tests/test.ini detailed-errors = 1 nologcapture = 1