Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

git-svn-id: http://code.djangoproject.com/svn/django/trunk@1906 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit ef60a399b37e3e5415874af77eda0f86ddf580b9 1 parent d062e62
Adrian Holovaty authored January 11, 2006

Showing 1 changed file with 33 additions and 1 deletion. Show diff stats Hide diff stats

  1. 34  docs/contributing.txt
34  docs/contributing.txt
@@ -211,6 +211,38 @@ repository:
211 211
       Subversion and Trac so that any commit message in that format will
212 212
       automatically post a comment to the appropriate ticket.
213 213
 
  214
+Unit tests
  215
+==========
  216
+
  217
+Django comes with a test suite of its own, in the ``tests`` directory of the
  218
+Django tarball. It's our policy to make sure all tests pass at all times.
  219
+
  220
+The 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
+
  232
+We appreciate any and all contributions to the test suite!
  233
+
  234
+Running the unit tests
  235
+----------------------
  236
+
  237
+To run the tests, ``cd`` to the ``tests/`` directory and type::
  238
+
  239
+    ./runtests.py --settings=path.to.django.settings
  240
+
  241
+Yes, the unit tests need a settings module, but only for database connection
  242
+info -- the ``DATABASE_ENGINE``, ``DATABASE_USER`` and ``DATABASE_PASSWORD``.
  243
+The 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.
  245
+
214 246
 Requesting features
215 247
 ===================
216 248
 
@@ -390,4 +422,4 @@ requests for commit access are potential flame-war starters, and will be ignored
390 422
 .. _PEP 8: http://www.python.org/peps/pep-0008.html
391 423
 .. _i18n documentation: http://www.djangoproject.com/documentation/i18n/
392 424
 .. _i18n branch: http://code.djangoproject.com/browser/django/branches/i18n
393  
-.. _`tags/releases`: http://code.djangoproject.com/browser/django/tags/releases
  425
+.. _`tags/releases`: http://code.djangoproject.com/browser/django/tags/releases

0 notes on commit ef60a39

Please sign in to comment.
Something went wrong with that request. Please try again.