<s> import os <EOL> import unittest <EOL> from simple_idml . id_package import ZipInDesignPackage <EOL> from simple_idml . id_package import merge_font_lst <EOL> CURRENT_DIR = os . path . dirname ( __file__ ) <EOL> IDMLFILES_DIR = os . path . join ( CURRENT_DIR , "<STR_LIT>" ) <EOL> class ZipInDesignPackageTestCase ( unittest . TestCase ) : <EOL> def test_get_font_list ( self ) : <EOL> archive_name = os . path . join ( IDMLFILES_DIR , "<STR_LIT>" ) <EOL> zip_indesign_package = ZipInDesignPackage ( archive_name , "<STR_LIT:r>" ) <EOL> self . assertEqual ( <EOL> set ( zip_indesign_package . get_font_list ( ) ) , <EOL> set ( [ ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) ] ) <EOL> ) <EOL> class IDPackageTestCase ( unittest . TestCase ) : <EOL> def test_merge_font_lst ( self ) : <EOL> font_suitecases = [ <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ] <EOL> filename , content = merge_font_lst ( font_suitecases ) <EOL> self . assertEqual ( content , "<STR_LIT>" ) <EOL> font_suitecases = [ <EOL> ( "<STR_LIT>" , "<STR_LIT>" ) , <EOL> ( "<STR_LIT>" , <EOL> """<STR_LIT>""" ) , <EOL> ( "<STR_LIT>" , <EOL> """<STR_LIT>""" ) ] <EOL> filename , content = merge_font_lst ( font_suitecases ) <EOL> self . assertEqual ( content , <EOL> """<STR_LIT>""" ) <EOL> def test_merge_font_lst_1file ( self ) : <EOL> font_suitecases = [ <EOL> ( u'<STR_LIT>' , <EOL> """<STR_LIT>""" ) <EOL> ] <EOL> filename , content = merge_font_lst ( font_suitecases ) <EOL> self . assertEqual ( content , '<STR_LIT>' ) <EOL> def suite ( ) : <EOL> suite = unittest . TestLoader ( ) . loadTestsFromTestCase ( ZipInDesignPackageTestCase ) <EOL> suite . addTests ( unittest . TestLoader ( ) . loadTestsFromTestCase ( IDPackageTestCase ) ) <EOL> return suite </s>
