<s> import os <EOL> from ... . utils . common import redirected_stdio <EOL> from bloom . generators . debian . generator import em <EOL> from bloom . generators . debian . generator import get_changelogs <EOL> from bloom . generators . debian . generator import format_description <EOL> from catkin_pkg . packages import find_packages <EOL> test_data_dir = os . path . join ( os . path . dirname ( __file__ ) , '<STR_LIT>' ) <EOL> def test_get_changelogs ( ) : <EOL> with redirected_stdio ( ) : <EOL> packages = dict ( [ ( pkg . name , pkg ) for path , pkg in find_packages ( test_data_dir ) . items ( ) ] ) <EOL> assert '<STR_LIT>' in packages <EOL> get_changelogs ( packages [ '<STR_LIT>' ] ) <EOL> def test_unicode_templating ( ) : <EOL> with redirected_stdio ( ) : <EOL> packages = dict ( [ ( pkg . name , pkg ) for path , pkg in find_packages ( test_data_dir ) . items ( ) ] ) <EOL> assert '<STR_LIT>' in packages <EOL> chlogs = get_changelogs ( packages [ '<STR_LIT>' ] ) <EOL> template = "<STR_LIT>" <EOL> em . expand ( template , { '<STR_LIT>' : chlogs [ <NUM_LIT:0> ] [ <NUM_LIT:2> ] } ) <EOL> def test_format_description ( ) : <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT:.>' == format_description ( '<STR_LIT:.>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT:.>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT:.>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT:..>' == format_description ( '<STR_LIT:..>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) <EOL> assert '<STR_LIT>' == format_description ( '<STR_LIT>' ) </s>
