def pathMatches(path, urlName, **kwargs):
resolved = urlresolvers.resolve(path)<EOL>resolvedName = '<STR_LIT>'.format(r = resolved) if resolved.namespace else resolved.url_name<EOL>if urlName != resolvedName:<EOL><INDENT>return False<EOL><DEDENT>for key, value in kwargs.items():<EOL><INDENT>currentArg = resolved.kwargs.get(key)<EOL>if currentArg is None or str(value) != str(currentArg):<EOL><INDENT>return False<EOL><DEDENT><DEDENT>return True<EOL>
:param path: str
:param urlName: str
:returns: bool.