From e8971345b4bf0e7ce2124d033ee3385919f47309 Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 1 Jul 2013 13:58:04 -0400 Subject: [PATCH] [1.4.x] Fixed #19196 -- Added test/requirements Backport of 4d92a0bd86 from master --- .../contributing/writing-code/unit-tests.txt | 19 +++++++++++++++++++ tests/requirements/base.txt | 9 +++++++++ tests/requirements/mysql.txt | 1 + tests/requirements/oracle.txt | 1 + tests/requirements/postgres.txt | 1 + 5 files changed, 31 insertions(+) create mode 100644 tests/requirements/base.txt create mode 100644 tests/requirements/mysql.txt create mode 100644 tests/requirements/oracle.txt create mode 100644 tests/requirements/postgres.txt diff --git a/docs/internals/contributing/writing-code/unit-tests.txt b/docs/internals/contributing/writing-code/unit-tests.txt index 3e791c09a1..06310962dd 100644 --- a/docs/internals/contributing/writing-code/unit-tests.txt +++ b/docs/internals/contributing/writing-code/unit-tests.txt @@ -141,29 +141,48 @@ Running all the tests If you want to run the full suite of tests, you'll need to install a number of dependencies: +* PIL_ +* py-bcrypt_ * PyYAML_ * Markdown_ * Textile_ * Docutils_ +* pytz_ * setuptools_ * memcached_, plus a :ref:`supported Python binding ` * gettext_ (:ref:`gettext_on_windows`) * selenium_ (if also using Python >= 2.6) +You can find these dependencies in `pip requirements files`_ inside the +``tests/requirements`` directory of the Django source tree and install them +like so:: + + pip install -r tests/requirements/base.txt + +You can also install the database adapter(s) of your choice using +``oracle.txt``, ``mysql.txt``, or ``postgres.txt``. + If you want to test the memcached cache backend, you'll also need to define a :setting:`CACHES` setting that points at your memcached instance. +To run the GeoDjango tests, you will need to :doc:`setup a spatial database +and install the Geospatial libraries`. + Each of these dependencies is optional. If you're missing any of them, the associated tests will be skipped. +.. _PIL: https://pypi.python.org/pypi/PIL +.. _py-bcrypt: https://pypi.python.org/pypi/py-bcrypt/ .. _PyYAML: http://pyyaml.org/wiki/PyYAML .. _Markdown: http://pypi.python.org/pypi/Markdown/1.7 .. _Textile: http://pypi.python.org/pypi/textile .. _docutils: http://pypi.python.org/pypi/docutils/0.4 +.. _pytz: https://pypi.python.org/pypi/pytz/ .. _setuptools: http://pypi.python.org/pypi/setuptools/ .. _memcached: http://memcached.org/ .. _gettext: http://www.gnu.org/software/gettext/manual/gettext.html .. _selenium: http://pypi.python.org/pypi/selenium +.. _pip requirements files: http://www.pip-installer.org/en/latest/requirements.html Code coverage ~~~~~~~~~~~~~ diff --git a/tests/requirements/base.txt b/tests/requirements/base.txt new file mode 100644 index 0000000000..606a8c7e2b --- /dev/null +++ b/tests/requirements/base.txt @@ -0,0 +1,9 @@ +docutils +Markdown +PIL +py-bcrypt +python-memcached +pytz +PyYAML +selenium +Textile diff --git a/tests/requirements/mysql.txt b/tests/requirements/mysql.txt new file mode 100644 index 0000000000..c7a2347407 --- /dev/null +++ b/tests/requirements/mysql.txt @@ -0,0 +1 @@ +MySQL-python diff --git a/tests/requirements/oracle.txt b/tests/requirements/oracle.txt new file mode 100644 index 0000000000..ae5b7349cd --- /dev/null +++ b/tests/requirements/oracle.txt @@ -0,0 +1 @@ +cx_oracle diff --git a/tests/requirements/postgres.txt b/tests/requirements/postgres.txt new file mode 100644 index 0000000000..658130bb2c --- /dev/null +++ b/tests/requirements/postgres.txt @@ -0,0 +1 @@ +psycopg2