def _check_warnings(warn_list, expected_type, expected_len):
 assert_equal(len(warn_list), expected_len, 'number of warnings')
 for warn_ in warn_list:
  assert_((warn_.category is expected_type))

def _check_warnings ( warn_list , expected_type , expected_len ) : assert_equal ( len ( warn_list ) , expected_len , 'number of warnings' ) for warn_ in warn_list : assert_ ( ( warn_ . category is expected_type ) )
checks that all of the warnings from a list returned by warnings .