"""Add some assert methods to nose.tools. These were added in Python 2.7/3.1, so
once we stop testing on Python 2.6, this file can be removed.
"""

import nose.tools as nt

def assert_in(item, collection):
    assert item in collection, '%r not in %r' % (item, collection)

if not hasattr(nt, 'assert_in'):
    nt.assert_in = assert_in

@@ -329,8 +329,188 @@
 sert_in%0A
+%0Adef assert_not_in(item, collection):%0A    assert item not in collection, '%25r in %25r' %25 (item, collection)%0A%0Aif not hasattr(nt, 'assert_not_in'):%0A    nt.assert_not_in = assert_not_in%0A

Add assert_not_in method for Python2.6