Django

Code

Changeset 1906

Show
Ignore:
Timestamp:
01/10/06 23:54:27 (3 years ago)
Author:
adrian
Message:

Added 'Unit tests' section to docs/contributing.txt

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/docs/contributing.txt

    r1861 r1906  
    211211      Subversion and Trac so that any commit message in that format will 
    212212      automatically post a comment to the appropriate ticket. 
     213 
     214Unit tests 
     215========== 
     216 
     217Django comes with a test suite of its own, in the ``tests`` directory of the 
     218Django tarball. It's our policy to make sure all tests pass at all times. 
     219 
     220The tests cover: 
     221 
     222    * Models and the database API (``tests/testapp/models``). 
     223    * The cache system (``tests/otherthests/cache.py``). 
     224    * The ``django.utils.dateformat`` module (``tests/othertests/dateformat.py``). 
     225    * Database typecasts (``tests/othertests/db_typecasts.py``). 
     226    * The template system (``tests/othertests/templates.py`` and 
     227      ``tests/othertests/defaultfilters.py``). 
     228    * ``QueryDict`` objects (``tests/othertests/httpwrappers.py``). 
     229    * Markup template tags (``tests/othertests/markup.py``). 
     230    * The ``django.utils.timesince`` module (``tests/othertests/timesince.py``). 
     231 
     232We appreciate any and all contributions to the test suite! 
     233 
     234Running the unit tests 
     235---------------------- 
     236 
     237To run the tests, ``cd`` to the ``tests/`` directory and type:: 
     238 
     239    ./runtests.py --settings=path.to.django.settings 
     240 
     241Yes, the unit tests need a settings module, but only for database connection 
     242info -- the ``DATABASE_ENGINE``, ``DATABASE_USER`` and ``DATABASE_PASSWORD``. 
     243The unit tests will not touch your database; they create a new database, called 
     244``django_test_db``, which is deleted when the tests are finished. 
    213245 
    214246Requesting features