#NEWLINE# def test_custom_descriptor( self ) : #NEWLINE# #INDENT# 'test that descriptors prevent inheritance from propigating properties to subclasses.' #NEWLINE# class MyDesc ( object ) : #NEWLINE# #INDENT# def __get__( self , instance , owner ) : #NEWLINE# #INDENT# if ( instance is None ) : #NEWLINE# #INDENT# return self #NEWLINE# #UNINDENT# return 'im the data' #NEWLINE# #UNINDENT# #UNINDENT# class Base ( object ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# class Sub ( Base ) : #NEWLINE# #INDENT# data = MyDesc ( ) #NEWLINE# #UNINDENT# mapper ( Base , base ) #NEWLINE# mapper ( Sub , subtable , inherits = Base ) #NEWLINE# s1 = Sub ( ) #NEWLINE# sess = create_session ( ) #NEWLINE# sess . add ( s1 ) #NEWLINE# sess . flush ( ) #NEWLINE# assert ( sess . query ( Sub ) . one ( ) . data == 'im the data' )