2
0
Эх сурвалжийг харах

Fixed #26448 -- Added details for running tests with a different database backend.

krishbharadwaj 9 жил өмнө
parent
commit
361cb7a857

+ 5 - 4
docs/internals/contributing/writing-code/unit-tests.txt

@@ -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``.

+ 4 - 1
docs/intro/contributing.txt

@@ -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