summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorBrett Cannon <bcannon@gmail.com>2004-12-06 06:08:59 (GMT)
committerBrett Cannon <bcannon@gmail.com>2004-12-06 06:08:59 (GMT)
commitc8aa848ece8b6745ffe905eff9202c041c2405e1 (patch)
tree47acc76dbbbc3a297f3007f0a8fbdcc64beadee5 /Doc
parent98809b76ae6f683cb41f370297b01fa466870761 (diff)
downloadcpython-c8aa848ece8b6745ffe905eff9202c041c2405e1.zip
cpython-c8aa848ece8b6745ffe905eff9202c041c2405e1.tar.gz
cpython-c8aa848ece8b6745ffe905eff9202c041c2405e1.tar.bz2
Have test_mkalias_relative check that sys.prefix already exists; otherwise test
is pointless. Also add a note to the docs for the 'test' package that test cases should check first that any conditions needed in the operating system are met before having a test run. Closes bug #1077302. THanks, Ian Holsman.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/lib/libtest.tex8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/lib/libtest.tex b/Doc/lib/libtest.tex
index f807051..54a24b1 100644
--- a/Doc/lib/libtest.tex
+++ b/Doc/lib/libtest.tex
@@ -31,8 +31,10 @@ style; these styles of tests will not be covered.
It is preferred that tests for the \module{test} package use the
\refmodule{unittest} module and follow a few guidelines.
-One is to have the name of all the test methods start with \samp{test_} as
-well as the module's name.
+One is to name the test module by starting it with \samp{test_} and end it with
+the name of the module being tested.
+The test methods in the test module should start with \samp{test_} and end with
+a description of what the method is testing.
This is needed so that the methods are recognized by the test driver as
test methods.
Also, no documentation string for the method should be included.
@@ -109,6 +111,8 @@ This leads to a few guidelines to be followed:
changed in the future.
\item Make sure to clean up after your tests (such as close and remove all
temporary files).
+\item If a test is dependent on a specific condition of the operating system
+ then verify the condition already exists before attempting the test.
\item Import as few modules as possible and do it as soon as possible.
This minimizes external dependencies of tests and also minimizes possible
anomalous behavior from side-effects of importing a module.