From 6dc237f318b9bdaf9c5a01bff8b33bf63b98ac9f Mon Sep 17 00:00:00 2001 From: Ben Waugh Date: Fri, 12 Apr 2013 10:53:26 +0100 Subject: [PATCH] Tidy section on other assertions in Nose. --- python/testing/cheat-sheet.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/python/testing/cheat-sheet.md b/python/testing/cheat-sheet.md index 0d6eac8..65c521b 100644 --- a/python/testing/cheat-sheet.md +++ b/python/testing/cheat-sheet.md @@ -60,12 +60,6 @@ There are some additional rules, and you can configure your own, but this should ### Other assertions Nose provides a range of assertions that can be used when a test is not just checking a simple equality, e.g. -* assertTrue, assertFalse -* assertIn, assertNotIn -* assertIs, assertIsNot -* assertRaises -* (what else?) - from nose.tools import assert_items_equal @@ -76,6 +70,12 @@ 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 +* assertRaises +* (what else?) + ### Floating point tests When comparing floating-point numbers for equality, allow some tolerance for small differences due to -- 2.26.2