summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbryan newbold <bnewbold@twinleaf.com>2014-12-18 21:27:12 -0800
committerbryan newbold <bnewbold@twinleaf.com>2014-12-18 21:27:12 -0800
commit0dd43313b6ca007fbe372b44f36fc641bb13e6cb (patch)
tree120190b713e54c4281611310aff1b5c33dcd4ea7
parent7a5f67a2921309dc2cd7355e5089b12965c8f225 (diff)
downloadknowledge-0dd43313b6ca007fbe372b44f36fc641bb13e6cb.tar.gz
knowledge-0dd43313b6ca007fbe372b44f36fc641bb13e6cb.zip
python: nosetests
-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
+
+