def assert_current_path(self, path, **kwargs):
query = CurrentPathQuery(path, **kwargs)<EOL>@self.document.synchronize<EOL>def assert_current_path():<EOL><INDENT>if not query.resolves_for(self):<EOL><INDENT>raise ExpectationNotMet(query.failure_message)<EOL><DEDENT><DEDENT>assert_current_path()<EOL>return True<EOL>
Asserts that the page has the given path. By default this will compare against the
path+query portion of the full URL.

Args:
    path (str | RegexObject): The string or regex that the current "path" should match.
    **kwargs: Arbitrary keyword arguments for :class:`CurrentPathQuery`.

Returns:
    True

Raises:
    ExpectationNotMet: If the assertion hasn't succeeded during the wait time.