Rev 5584: Add a warning about doctest isolation in the developer doc. in file:///home/vila/src/bzr/bugs/test-isolation/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Jan 3 13:13:50 UTC 2011
At file:///home/vila/src/bzr/bugs/test-isolation/
------------------------------------------------------------
revno: 5584
revision-id: v.ladeuil+lp at free.fr-20110103131350-k9c944yrw7luf6j4
parent: v.ladeuil+lp at free.fr-20101224105349-b22x05h00j0kpfss
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 321320-isolate-doc-tests
timestamp: Mon 2011-01-03 14:13:50 +0100
message:
Add a warning about doctest isolation in the developer doc.
-------------- next part --------------
=== modified file 'doc/developers/testing.txt'
--- a/doc/developers/testing.txt 2010-12-16 17:45:14 +0000
+++ b/doc/developers/testing.txt 2011-01-03 13:13:50 +0000
@@ -329,8 +329,11 @@
We make selective use of doctests__. In general they should provide
*examples* within the API documentation which can incidentally be tested. We
don't try to test every important case using doctests |--| regular Python
-tests are generally a better solution. That is, we just use doctests to
-make our documentation testable, rather than as a way to make tests.
+tests are generally a better solution. That is, we just use doctests to make
+our documentation testable, rather than as a way to make tests. Be aware that
+doctests are not as well isolated as the unit tests, if you need more
+isolation, you're likely want to write unit tests anyway if only to get a
+better control of the test environment.
Most of these are in ``bzrlib/doc/api``. More additions are welcome.
More information about the bazaar-commits
mailing list