def assert_naming(warns, fname, n_warn):
 from nose.tools import assert_true
 assert_true((sum((('naming conventions' in str(ww.message)) for ww in warns)) == n_warn))
 for ww in warns:
  if ('naming conventions' in str(ww.message)):
   assert_true((fname in ww.filename), msg=('"%s" not in "%s"' % (fname, ww.filename)))

def assert_naming ( warns , fname , n_warn ) : from nose . tools import assert_true assert_true ( ( sum ( ( ( 'naming conventions' in str ( ww . message ) ) for ww in warns ) ) == n_warn ) ) for ww in warns : if ( 'naming conventions' in str ( ww . message ) ) : assert_true ( ( fname in ww . filename ) , msg = ( '"%s" not in "%s"' % ( fname , ww . filename ) ) )
assert a non-standard naming scheme was used while saving or loading parameters warns : list list of warnings from warnings .