def test_classproperty_docstring():
 class A(object, ):
  @classproperty
  def foo(cls):
   u'The foo.'
   return 1
 assert (A.__dict__[u'foo'].__doc__ == u'The foo.')
 class B(object, ):
  def _get_foo(cls):
   return 1
  foo = classproperty(_get_foo, doc=u'The foo.')
 assert (B.__dict__[u'foo'].__doc__ == u'The foo.')

def test_classproperty_docstring ( ) : class A ( object , ) : @ classproperty def foo ( cls ) : return 1 assert ( A . __dict__ [ u'foo' ] . __doc__ == u'The foo.' ) class B ( object , ) : def _get_foo ( cls ) : return 1 foo = classproperty ( _get_foo , doc = u'The foo.' ) assert ( B . __dict__ [ u'foo' ] . __doc__ == u'The foo.' )
tests that the docstring is set correctly on classproperties .