def __getattr__(self, attr):
        """Asserts that val has attribute attr and that attribute's value is equal to other via a dynamic assertion of the form: has_<attr>()."""
        if not attr.startswith('has_'):
            raise AttributeError('assertpy has no assertion <%s()>' % attr)

        attr_name = attr[4:]
        if not hasattr(self.val, attr_name):
            raise AttributeError('val has no attribute <%s>' % attr_name)

        def _wrapper(*args, **kwargs):
            if len(args) != 1:
                raise TypeError('assertion <%s()> takes exactly 1 argument (%d given)' % (attr, len(args)))
            other = args[0]
            val_attr = getattr(self.val, attr_name)

            if callable(val_attr):
                try:
                    val = val_attr()
                except __HOLE__:
                    raise TypeError('val does not have zero-arg method <%s()>' % attr_name)
            else:
                val = val_attr

            if val != other:
                self._err('Expected <%s> to be equal to <%s>, but was not.' % (val, other))
            return self
        return _wrapper

### expected exceptions ###
dataset/ETHPy150Open ActivisionGameScience/assertpy/assertpy/assertpy.py/AssertionBuilder.__getattr__