def icon_path(self): """ Should return the path to the icon for the given console. This icon should be located in the resources/images/icons directory, and should be named the same as the emulator shortname with a .png extension """ icon_filename = self.shortname + ".png" return os.path.join(filesystem_helper.icons_directory(),icon_filename)
def test_icon_path(self): """ The icon path for a console should be in the icons directory, and the file should be named the shortname of the console with a .png extension """ gba_path = self.console.icon_path() self.assertEqual(os.path.dirname(gba_path),filesystem_helper.icons_directory()) self.assertEqual(os.path.basename(gba_path),self.console.shortname + ".png")
def icon_path(self): """ Should return the path to the icon for the given console. This icon should be located in the resources/images/icons directory, and should be named the same as the emulator shortname with a .png extension """ icon_filename = self.shortname + ".png" return os.path.join(filesystem_helper.icons_directory(), icon_filename)
def test_icon_path(self): """ The icon path for a console should be in the icons directory, and the file should be named the shortname of the console with a .png extension """ gba_path = self.console.icon_path() self.assertEqual(os.path.dirname(gba_path), filesystem_helper.icons_directory()) self.assertEqual(os.path.basename(gba_path), self.console.shortname + ".png")