projects
/
swc-testing-nose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6dc237f
)
Replace partial list of Nose assertions with instructions for listing them in Python.
test-waugh
author
Ben Waugh
<b.waugh@ucl.ac.uk>
Fri, 12 Apr 2013 09:58:20 +0000
(10:58 +0100)
committer
W. Trevor King
<wking@tremily.us>
Fri, 1 Nov 2013 20:49:46 +0000
(13:49 -0700)
python/testing/cheat-sheet.md
patch
|
blob
|
history
diff --git
a/python/testing/cheat-sheet.md
b/python/testing/cheat-sheet.md
index 65c521b4c6982230760363b801052f210003ddcd..36f355709f614c5db67e2a5e841f0d718e8470e8 100644
(file)
--- a/
python/testing/cheat-sheet.md
+++ b/
python/testing/cheat-sheet.md
@@
-70,11
+70,11
@@
Nose provides a range of assertions that can be used when a test is not just che
expected = [2, 3]
assert_items_equal(observed, expected) # order of factors is not guaranteed
-* assertTrue, assertFalse
-* assertIn, assertNotIn
-* assertIs, assertIsNot
-
* assertRaise
s
-* (what else?)
+To see the available assertions, and get help with them:
+
+ import nose.tools
+
dir(nose.tools) # list assertions and other classes/function
s
+ help(nose.tools.assert_set_equal) # get information about one of them
### Floating point tests