<s> import unittest <EOL> try : <EOL> from catkin . terminal_color import ansi , enable_ANSI_colors , fmt , sanitize <EOL> except ImportError as e : <EOL> raise ImportError ( <EOL> '<STR_LIT>' % str ( e ) <EOL> ) <EOL> try : <EOL> char = unichr <EOL> except NameError : <EOL> char = chr <EOL> class TerminalColorTest ( unittest . TestCase ) : <EOL> def test_terminal_colors ( self ) : <EOL> enable_ANSI_colors ( ) <EOL> assert ansi ( '<STR_LIT>' ) != '<STR_LIT>' <EOL> test = '<STR_LIT>' <EOL> rslt = '<STR_LIT>' <EOL> assert fmt ( test ) == rslt <EOL> test = '<STR_LIT>' <EOL> test = sanitize ( test ) <EOL> rslt = '<STR_LIT>' <EOL> assert fmt ( test ) == rslt <EOL> test = char ( <NUM_LIT> ) <EOL> test = sanitize ( test ) <EOL> rslt = char ( <NUM_LIT> ) <EOL> assert test == rslt </s>
