capybara/session_matchers.py
def assert_no_current_path(self, path, **kwargs):
        """
        Asserts that the page doesn't have the given path.

        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_no_current_path():
            if query.resolves_for(self):
                raise ExpectationNotMet(query.negative_failure_message)

        assert_no_current_path()

        return True
def assert_no_current_path(self, path, **kwargs):
        query = CurrentPathQuery(path, **kwargs)

        @self.document.synchronize
        def assert_no_current_path():
            if query.resolves_for(self):
                raise ExpectationNotMet(query.negative_failure_message)

        assert_no_current_path()

        return True
def assert_no_current_path ( self , path , * * kwargs ) : query = CurrentPathQuery ( path , * * kwargs ) @ self . document . synchronize def assert_no_current_path ( ) : if query . resolves_for ( self ) : raise ExpectationNotMet ( query . negative_failure_message ) assert_no_current_path ( ) return True
Asserts that the page doesn't have the given path.

        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 doesn t have the given path .