summaryrefslogtreecommitdiff
path: root/docs/contributing.txt
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2006-01-11 05:54:27 +0000
committerAdrian Holovaty <adrian@holovaty.com>2006-01-11 05:54:27 +0000
commitef60a399b37e3e5415874af77eda0f86ddf580b9 (patch)
treeab4a98e8f8cedc30eff8bcc8429198f86f36cc9a /docs/contributing.txt
parentd062e6278dc1715d1d2f26badd46dd627bba10e3 (diff)
Added 'Unit tests' section to docs/contributing.txt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@1906 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'docs/contributing.txt')
-rw-r--r--docs/contributing.txt34
1 files changed, 33 insertions, 1 deletions
diff --git a/docs/contributing.txt b/docs/contributing.txt
index dd682f2889..be3cbe232d 100644
--- a/docs/contributing.txt
+++ b/docs/contributing.txt
@@ -211,6 +211,38 @@ repository:
Subversion and Trac so that any commit message in that format will
automatically post a comment to the appropriate ticket.
+Unit tests
+==========
+
+Django comes with a test suite of its own, in the ``tests`` directory of the
+Django tarball. It's our policy to make sure all tests pass at all times.
+
+The tests cover:
+
+ * Models and the database API (``tests/testapp/models``).
+ * The cache system (``tests/otherthests/cache.py``).
+ * The ``django.utils.dateformat`` module (``tests/othertests/dateformat.py``).
+ * Database typecasts (``tests/othertests/db_typecasts.py``).
+ * The template system (``tests/othertests/templates.py`` and
+ ``tests/othertests/defaultfilters.py``).
+ * ``QueryDict`` objects (``tests/othertests/httpwrappers.py``).
+ * Markup template tags (``tests/othertests/markup.py``).
+ * The ``django.utils.timesince`` module (``tests/othertests/timesince.py``).
+
+We appreciate any and all contributions to the test suite!
+
+Running the unit tests
+----------------------
+
+To run the tests, ``cd`` to the ``tests/`` directory and type::
+
+ ./runtests.py --settings=path.to.django.settings
+
+Yes, the unit tests need a settings module, but only for database connection
+info -- the ``DATABASE_ENGINE``, ``DATABASE_USER`` and ``DATABASE_PASSWORD``.
+The unit tests will not touch your database; they create a new database, called
+``django_test_db``, which is deleted when the tests are finished.
+
Requesting features
===================
@@ -390,4 +422,4 @@ requests for commit access are potential flame-war starters, and will be ignored
.. _PEP 8: http://www.python.org/peps/pep-0008.html
.. _i18n documentation: http://www.djangoproject.com/documentation/i18n/
.. _i18n branch: http://code.djangoproject.com/browser/django/branches/i18n
-.. _`tags/releases`: http://code.djangoproject.com/browser/django/tags/releases \ No newline at end of file
+.. _`tags/releases`: http://code.djangoproject.com/browser/django/tags/releases