summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--software/python.page16
1 files changed, 16 insertions, 0 deletions
diff --git a/software/python.page b/software/python.page
index 05b584d..cd1fb0b 100644
--- a/software/python.page
+++ b/software/python.page
@@ -98,3 +98,19 @@ RunSnakeRun
$ python -m cProfile -o ./dump.profile myscript.py --script-option blah
$ # run to completion or Ctrl-C, then
$ runsnakerun ./dump.profile
+
+nosetests
+-------------
+
+To do minimal tests without wrapping everything in a class, import assert
+functions from nose.tools, eg:
+
+ from nose.tools import assert_raises, assert_equal
+
+To do interactive pdb debugging, simply:
+
+ $ nosetests --pdb
+ # or sometimes:
+ $ nosetests --pdb-failures
+
+