<s> import os <EOL> import shutil <EOL> import tempfile <EOL> import unittest <EOL> from mockito import * <EOL> from nose_parameterized import parameterized <EOL> from pysteam import model as steam_model <EOL> from ice import model <EOL> from ice import paths <EOL> from ice import roms <EOL> from testinfra import fixtures <EOL> class ROMsTests ( unittest . TestCase ) : <EOL> def setUp ( self ) : <EOL> pass <EOL> @ parameterized . expand ( [ <EOL> ( None , paths . default_roms_directory ( ) ) , <EOL> ( "<STR_LIT>" , paths . default_roms_directory ( ) ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] ) <EOL> def test_roms_directory ( self , config_directory , expected ) : <EOL> config = mock ( ) <EOL> config . roms_directory = config_directory <EOL> self . assertEqual ( roms . roms_directory ( config ) , expected ) <EOL> @ parameterized . expand ( [ <EOL> ( '<STR_LIT>' , None , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) , <EOL> ] ) <EOL> def test_rom_shortcut_name ( self , name , console_prefix , expected ) : <EOL> console = model . Console ( <EOL> fullname = '<STR_LIT>' , <EOL> shortname = '<STR_LIT>' , <EOL> extensions = '<STR_LIT>' , <EOL> custom_roms_directory = '<STR_LIT>' , <EOL> prefix = console_prefix , <EOL> icon = '<STR_LIT>' , <EOL> images_directory = '<STR_LIT>' , <EOL> emulator = None , <EOL> ) <EOL> rom = model . ROM ( <EOL> name = name , <EOL> path = '<STR_LIT>' , <EOL> console = console <EOL> ) <EOL> self . assertEqual ( roms . rom_shortcut_name ( rom ) , expected ) <EOL> @ parameterized . expand ( [ <EOL> ( fixtures . roms . banjo_kazooie , steam_model . Shortcut ( <EOL> name = '<STR_LIT>' , <EOL> exe = '<STR_LIT>' , <EOL> startdir = '<STR_LIT>' , <EOL> icon = '<STR_LIT>' , <EOL> tags = [ '<STR_LIT>' ] <EOL> ) ) <EOL> ] ) <EOL> def test_rom_to_shortcut ( self , rom , expected ) : <EOL> self . assertEqual ( roms . rom_to_shortcut ( rom ) , expected ) </s>
