diff options
| author | Tim Graham <timograham@gmail.com> | 2013-10-22 10:52:04 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2013-10-23 18:27:06 -0400 |
| commit | c573d6de173c0e6743473081cde786e749641a48 (patch) | |
| tree | 50db9d0be2c5e74b21627b44d00f0acea9ba47a2 /docs | |
| parent | 5ab8b5d72c5277833908bc57b0765682e5aadc0b (diff) | |
Fixed #19941 -- Removed sys.path hack when running the test suite.
Thanks jezdez for the suggestion.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/internals/contributing/writing-code/unit-tests.txt | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 585b3911d3..99969e36d6 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -32,18 +32,20 @@ sample settings module that uses the SQLite database. To run the tests: git clone git@github.com:django/django.git django-repo cd django-repo/tests - ./runtests.py + PYTHONPATH=..:$PYTHONPATH ./runtests.py .. versionchanged:: 1.7 -Older versions of Django required running the tests like this:: +Older versions of Django required specifying a settings file:: 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`. +``runtests.py`` now uses ``test_sqlite`` by default if settings aren't provided +through either ``--settings`` or :envvar:`DJANGO_SETTINGS_MODULE`. + +You can avoid typing the ``PYTHONPATH`` bit each time by adding your Django +checkout to your ``PYTHONPATH`` or by installing the source checkout using pip. +See :ref:`installing-development-version`. .. _running-unit-tests-settings: |
