def skip_if_no_package(*args, **kwargs):
 from nose import SkipTest
 package_check(exc_failed_import=SkipTest, exc_failed_check=SkipTest, *args, **kwargs)

def skip_if_no_package ( * args , ** kwargs ) : from nose import SkipTest package_check ( exc_failed_import = SkipTest , exc_failed_check = SkipTest , * args , ** kwargs )
raise skiptest if package_check fails parameters *args positional parameters passed to package_check *kwargs keyword parameters passed to package_check .