diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2013-02-28 10:00:38 +0200 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-07-24 07:33:03 -0400 |
| commit | b2314d9e1e08749f2c05151f9cd44520d2b3a03a (patch) | |
| tree | 9bfba0bfa58ec1899befafed576e3c753f000914 /docs | |
| parent | 372158a3cfedfc76d931f73cc3acf148babc4248 (diff) | |
Fixed #19941 -- Modified runtests.py to make running the tests easier.
1. Automatically use tests/../django as the Django version.
2. If settings aren't provided through --settings or DJANGO_SETTINGS_MODULE)
then use test_sqlite.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/contributing/writing-code/unit-tests.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 7ee65cd6fa..b38c6f6783 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -25,16 +25,26 @@ Quickstart ~~~~~~~~~~ Running the tests requires a Django settings module that defines the -databases to use. To make it easy to get started, Django provides a -sample settings module that uses the SQLite database. To run the tests -with this sample ``settings`` module: +databases to use. To make it easy to get started, Django provides and uses a +sample settings module that uses the SQLite database. To run the tests: .. code-block:: bash git clone git@github.com:django/django.git django-repo cd django-repo/tests + ./runtests.py + +.. versionchanged:: 1.7 + +Older versions of Django required running the tests like this:: + PYTHONPATH=..:$PYTHONPATH python ./runtests.py --settings=test_sqlite +``runtests.py`` now uses the Django package found at ``tests/../django`` (there +isn't a need to add this on your ``PYTHONPATH``) and ``test_sqlite`` for the +settings if settings aren't provided through either ``--settings`` or +:envvar:`DJANGO_SETTINGS_MODULE`. + .. _running-unit-tests-settings: Using another ``settings`` module |
