Mercurial > kallithea
changeset 7390:451b3f9d814e
docs: update i18n doc after TG migration changed lang to i18n.lang and test.ini is generated
These descriptions are not elegant, but now we make them less wrong.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Mon, 29 Oct 2018 01:07:15 +0100 |
parents | 0955a02f7170 |
children | c363f492c117 |
files | docs/contributing.rst kallithea/i18n/how_to kallithea/tests/conftest.py scripts/generate-ini.py |
diffstat | 4 files changed, 8 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/docs/contributing.rst Fri Oct 12 20:39:17 2018 +0200 +++ b/docs/contributing.rst Mon Oct 29 01:07:15 2018 +0100 @@ -99,13 +99,14 @@ You can also use ``tox`` to run the tests with all supported Python versions (currently Python 2.6--2.7). -When running tests, Kallithea uses `kallithea/tests/test.ini` and populates the -SQLite database specified there. +When running tests, Kallithea generates a `test.ini` based on template values +in `kallithea/tests/conftest.py` 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:: - gearbox serve -c kallithea/tests/test.ini --pid-file=test.pid --daemon + gearbox serve -c /tmp/kallithea-test-XXX/test.ini --pid-file=test.pid --daemon KALLITHEA_WHOOSH_TEST_DISABLE=1 KALLITHEA_NO_TMP_PATH=1 py.test kill -9 $(cat test.pid)
--- a/kallithea/i18n/how_to Fri Oct 12 20:39:17 2018 +0200 +++ b/kallithea/i18n/how_to Mon Oct 29 01:07:15 2018 +0100 @@ -88,11 +88,8 @@ Testing translations -------------------- -Edit kallithea/tests/test.ini file and set lang attribute to:: - - lang=<new_language_code> - -Run Kallithea tests by executing:: +Edit `kallithea/tests/conftest.py` and set `i18n.lang` to `<new_language_code>` +and run Kallithea tests by executing:: py.test
--- a/kallithea/tests/conftest.py Fri Oct 12 20:39:17 2018 +0200 +++ b/kallithea/tests/conftest.py Mon Oct 29 01:07:15 2018 +0100 @@ -46,6 +46,7 @@ 'show_revision_number': 'true', 'beaker.cache.sql_cache_short.expire': '1', 'beaker.session.secret': '{74e0cd75-b339-478b-b129-07dd221def1f}', + #'i18n.lang': '', }, '[handler_console]': { 'formatter': 'color_formatter',
--- a/scripts/generate-ini.py Fri Oct 12 20:39:17 2018 +0200 +++ b/scripts/generate-ini.py Mon Oct 29 01:07:15 2018 +0100 @@ -1,8 +1,6 @@ #!/usr/bin/env python2 """ -Based on kallithea/lib/paster_commands/template.ini.mako, generate - development.ini - kallithea/tests/test.ini +Based on kallithea/lib/paster_commands/template.ini.mako, generate development.ini """ import re