def test_import_raises():
 nt.assert_raises(ImportError, import_item, 'IPython.foobar')

def test_import_raises ( ) : nt . assert_raises ( ImportError , import_item , 'IPython.foobar' )
test that failing imports raise the right exception .