summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorendolith <endolith@gmail.com>2015-03-08 19:31:41 -0400
committerendolith <endolith@gmail.com>2015-03-08 19:31:41 -0400
commit82c03c24f1dd40efc9b9b00783035898c6eacdfb (patch)
tree7a71101650ec5ccac6591a2a5470e17530f72367 /doc
parent9fc077332b34a7b2a90126f5ae6cc50d57162db5 (diff)
downloadnumpy-82c03c24f1dd40efc9b9b00783035898c6eacdfb.tar.gz
Add note about random seeds
Diffstat (limited to 'doc')
-rw-r--r--doc/TESTS.rst.txt10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/TESTS.rst.txt b/doc/TESTS.rst.txt
index bfea0e117..876f37bc5 100644
--- a/doc/TESTS.rst.txt
+++ b/doc/TESTS.rst.txt
@@ -374,3 +374,13 @@ at the end of the test run. Skipped tests are marked as ``'S'`` in
the test results (or ``'SKIPPED'`` for ``verbose > 1``), and known
failing tests are marked as ``'K'`` (or ``'KNOWN'`` if ``verbose >
1``).
+
+Tests on random data
+--------------------
+
+Tests on random data are good, but since test failures are meant to
+expose new bugs or regressions, a test that passes most of the time
+but fails occasionally with no code changes is not helpful.
+Make the random data deterministic by setting the random number seed
+before generating it. Either Python's ``random.seed()`` or Numpy's
+``numpy.random.seed()``, depending on the source of random numbers.