From c573d6de173c0e6743473081cde786e749641a48 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Tue, 22 Oct 2013 10:52:04 -0400 Subject: Fixed #19941 -- Removed sys.path hack when running the test suite. Thanks jezdez for the suggestion. --- docs/internals/contributing/writing-code/unit-tests.txt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'docs/internals/contributing/writing-code') 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: -- cgit v1.3