def test_descriptors_custom_attrs():
 class mydesc(object, ):
  def __get__(self, instance, ctx):
   raise AttributeError
 class f(object, ):
  x = mydesc()
  def __getattr__(self, name):
   return 42
 AreEqual(f().x, 42)

def test_descriptors_custom_attrs ( ) : class mydesc ( object , ) : def __get__ ( self , instance , ctx ) : raise AttributeError class f ( object , ) : x = mydesc ( ) def __getattr__ ( self , name ) : return 42 AreEqual ( f ( ) . x , 42 )
verifies the interaction between descriptors and custom attribute access works properly .