
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


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

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

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

Add assert_not_in method for Python2.6
Add assert_not_in method for Python2.6

  
  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
  
+ def assert_not_in(item, collection):
+     assert item not in collection, '%r in %r' % (item, collection)
+ 
+ if not hasattr(nt, 'assert_not_in'):
+     nt.assert_not_in = assert_not_in
+ 
Add assert_not_in method for Python2.6
## Code Before:

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

## Instruction:
Add assert_not_in method for Python2.6
## Code After:

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

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

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