def assert_has_element_with_path(output, path):
 if (xml_find(output, path) is None):
  errmsg = ('Expected to find XML element matching expression %s, not such match was found.' % path)
  raise AssertionError(errmsg)

def assert_has_element_with_path ( output , path ) : if ( xml_find ( output , path ) is None ) : errmsg = ( 'Expected to find XML element matching expression %s, not such match was found.' % path ) raise AssertionError ( errmsg )
asserts the specified output has at least one xml element with a path matching the specified path argument .