Changeset - 19267f233d39
[Not reviewed]
default
1 7 1
Mads Kiilerich - 10 years ago 2015-08-20 17:29:55
madski@unity3d.com
tests: move test.ini to kallithea/tests/
8 files changed with 9 insertions and 8 deletions:
0 comments (0 inline, 0 general)
.hgignore
Show inline comments
 
@@ -13,12 +13,13 @@ syntax: regexp
 
^rcextensions
 
^build
 
^dist/
 
^docs/build/
 
^docs/_build/
 
^data$
 
^kallithea/tests/data$
 
^sql_dumps/
 
^\.settings$
 
^\.project$
 
^\.pydevproject$
 
^\.coverage$
 
^kallithea\.db$
MANIFEST.in
Show inline comments
 
@@ -14,8 +14,8 @@ include           kallithea/config/deplo
 
recursive-include kallithea/i18n *
 
recursive-include kallithea/lib/dbmigrate *.py_tmpl README migrate.cfg
 
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
docs/contributing.rst
Show inline comments
 
@@ -47,19 +47,19 @@ Running tests
 
-------------
 

	
 
After finishing your changes make sure all tests pass cleanly. You can run
 
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)
 

	
 
You can run individual tests by specifying their path as argument to nosetests.
 
nosetests also has many more options, see `nosetests -h`. Some useful options
 
are::
kallithea/i18n/how_to
Show inline comments
 
@@ -80,13 +80,13 @@ Update the PO file by doing::
 
Edit the new updated translation file. Repeat all steps after `init_catalog` step from
 
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=<new_language_code>
 

	
 
Run Kallithea tests by executing::
 

	
 
    nosetests
kallithea/tests/conftest.py
Show inline comments
 
@@ -12,13 +12,13 @@ def pytest_configure():
 
    path = os.getcwd()
 
    sys.path.insert(0, path)
 
    pkg_resources.working_set.add_entry(path)
 

	
 
    # 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
 
    # to the config object
 
    conf = getattr(pylons.test.pylonsapp, 'config')
 
    if conf:
kallithea/tests/other/manual_test_vcs_operations.py
Show inline comments
 
@@ -15,13 +15,13 @@
 
kallithea.tests.other.manual_test_vcs_operations
 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 

	
 
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
 

	
 
This file was forked by the Kallithea project in July 2014.
 
Original author and date, and relevant copyright and licensing information is below:
kallithea/tests/test.ini
Show inline comments
 
file renamed from test.ini to kallithea/tests/test.ini
setup.cfg
Show inline comments
 
@@ -3,13 +3,13 @@ tag_build =
 
tag_svn_revision = 0
 
tag_date = 0
 

	
 
[nosetests]
 
verbose = True
 
verbosity = 2
 
with-pylons = test.ini
 
with-pylons = kallithea/tests/test.ini
 
detailed-errors = 1
 
nologcapture = 1
 

	
 
[pytest]
 
# only look for tests in kallithea/tests
 
python_files = kallithea/tests/**/test_*.py
0 comments (0 inline, 0 general)