mirror of
https://github.com/django/django.git
synced 2024-12-23 01:25:58 +00:00
Fixed #26448 -- Added details for running tests with a different database backend.
This commit is contained in:
parent
90ce5d46bf
commit
361cb7a857
@ -50,10 +50,11 @@ Having problems? See :ref:`troubleshooting-unit-tests` for some common issues.
|
||||
Using another ``settings`` module
|
||||
---------------------------------
|
||||
|
||||
The included settings module allows you to run the test suite using
|
||||
SQLite. If you want to test behavior using a different database (and
|
||||
if you're proposing patches for Django, it's a good idea to test
|
||||
across databases), you may need to define your own settings file.
|
||||
The included settings module (``tests/test_sqlite.py``) allows you to run the
|
||||
test suite using SQLite. If you want to run the tests using a different
|
||||
database, you'll need to define your own settings file. Some tests, such as
|
||||
those for ``contrib.postgres``, are specific to a particular database backend
|
||||
and will be skipped if run with a different backend.
|
||||
|
||||
To run the tests with different settings, ensure that the module is on your
|
||||
``PYTHONPATH`` and pass the module with ``--settings``.
|
||||
|
@ -273,7 +273,10 @@ passing tests.
|
||||
Skipped tests are typically due to missing external libraries required to run
|
||||
the test; see :ref:`running-unit-tests-dependencies` for a list of dependencies
|
||||
and be sure to install any for tests related to the changes you are making (we
|
||||
won't need any for this tutorial).
|
||||
won't need any for this tutorial). Some tests are specific to a particular
|
||||
database backend and will be skipped if not testing with that backend. SQLite
|
||||
is the database backend for the default settings. To run the tests using a
|
||||
different backend, see :ref:`running-unit-tests-settings`.
|
||||
|
||||
Once the tests complete, you should be greeted with a message informing you
|
||||
whether the test suite passed or failed. Since you haven't yet made any changes
|
||||
|
Loading…
Reference in New Issue
Block a user