Ensures :attr:`subject` has non-zero length.

def is_nonempty(self):
        """
        Ensures :attr:`subject` has non-zero length.
        """
        if len(self._subject) == 0:
            raise self._error_factory(_format("Expected {} to be non-empty", self._subject))
        return ChainInspector(self._subject)