#NEWLINE# def test_simple_case( self ) : #NEWLINE# #INDENT# 'Test a simple trait wrapped as a shadow property.' #NEWLINE# s = Simple ( x = 10.0 ) #NEWLINE# self . assertEqual ( s . _test , 1 ) #NEWLINE# self . assertEqual ( s . x , 10.0 ) #NEWLINE# s . x = 10.0 #NEWLINE# self . assertEqual ( s . _test , 1 ) #NEWLINE# self . assertEqual ( s . x , 10.0 ) #NEWLINE# s . x = 20.0 #NEWLINE# self . assertEqual ( s . _test , 2 ) #NEWLINE# self . assertEqual ( s . x , 20.0 ) #NEWLINE# self . assertRaises ( TraitError , s . __setattr__ , 'x' , 'hey' )