summaryrefslogtreecommitdiff
path: root/bleach/tests/tools.py
diff options
context:
space:
mode:
Diffstat (limited to 'bleach/tests/tools.py')
-rw-r--r--bleach/tests/tools.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/bleach/tests/tools.py b/bleach/tests/tools.py
new file mode 100644
index 0000000..87f926c
--- /dev/null
+++ b/bleach/tests/tools.py
@@ -0,0 +1,7 @@
+
+
+def in_(l, a, msg=None):
+ """Shorthand for 'assert a in l, "%r not in %r" % (a, l)
+ """
+ if not a in l:
+ raise AssertionError(msg or "%r not in %r" % (a, l))