capybara/session_matchers.py
def assert_current_path(self, path, **kwargs):
        """
        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.
        """

        query = CurrentPathQuery(path, **kwargs)

        @self.document.synchronize
        def assert_current_path():
            if not query.resolves_for(self):
                raise ExpectationNotMet(query.failure_message)
        assert_current_path()

        return True
def assert_current_path(self, path, **kwargs):
        """
        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.
        """

        query = CurrentPathQuery(path, **kwargs)

        @self.document.synchronize
        def assert_current_path():
            if not query.resolves_for(self):
                raise ExpectationNotMet(query.failure_message)
        assert_current_path()

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