def emits_warning(*messages):
 @decorator
 def decorate(fn, *args, **kw):
  with expect_warnings(assert_=False, *messages):
   return fn(*args, **kw)
 return decorate

def emits_warning ( * messages ) : @ decorator def decorate ( fn , * args , ** kw ) : with expect_warnings ( assert_ = False , * messages ) : return fn ( * args , ** kw ) return decorate
mark a test as emitting a warning .