<s> "<STR_LIT>" <EOL> __version__ = "<STR_LIT>" <EOL> import unittest <EOL> import os <EOL> import mplStyle . types as S <EOL> class MySubStyle ( S . SubStyle ) : <EOL> """<STR_LIT>""" <EOL> prop = S . property . Enum ( { <NUM_LIT:1> : '<STR_LIT:A>' , <EOL> <NUM_LIT:2> : '<STR_LIT:B>' , <EOL> <NUM_LIT:3> : '<STR_LIT:C>' , } , default = None ) <EOL> class TestEnum ( unittest . TestCase ) : <EOL> """<STR_LIT>""" <EOL> def setUp ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def tearDown ( self ) : <EOL> """<STR_LIT>""" <EOL> pass <EOL> def testEnum ( self ) : <EOL> """<STR_LIT>""" <EOL> style = MySubStyle ( ) <EOL> self . assertEqual ( None , MySubStyle . prop . default , <EOL> msg = "<STR_LIT>" ) <EOL> self . assertEqual ( None , style . prop , <EOL> msg = "<STR_LIT>" ) <EOL> style . prop = <NUM_LIT:1> <EOL> self . assertEqual ( None , MySubStyle . prop . default , <EOL> msg = "<STR_LIT>" ) <EOL> self . assertEqual ( '<STR_LIT:A>' , style . prop , <EOL> msg = "<STR_LIT>" ) <EOL> newStyle = MySubStyle ( prop = <NUM_LIT:3> ) <EOL> self . assertEqual ( None , MySubStyle . prop . default , <EOL> msg = "<STR_LIT>" ) <EOL> self . assertEqual ( '<STR_LIT:A>' , style . prop , <EOL> msg = "<STR_LIT>" ) <EOL> self . assertEqual ( '<STR_LIT:C>' , newStyle . prop , <EOL> msg = "<STR_LIT>" ) <EOL> newStyle . prop = "<STR_LIT:2>" <EOL> self . assertEqual ( None , MySubStyle . prop . default , <EOL> msg = "<STR_LIT>" ) <EOL> self . assertEqual ( '<STR_LIT:A>' , style . prop , <EOL> msg = "<STR_LIT>" ) <EOL> self . assertEqual ( '<STR_LIT:B>' , newStyle . prop , <EOL> msg = "<STR_LIT>" ) <EOL> msg = "<STR_LIT>" <EOL> self . assertRaises ( Exception , MySubStyle , prop = '<STR_LIT>' , msg = msg ) <EOL> s = '<STR_LIT>' <EOL> self . assertEqual ( s , str ( MySubStyle . prop ) , msg = "<STR_LIT>" ) </s>
