def is_installed(self): # check path and requirements if not super().is_installed: return False if self.desktop_filename: return launcher_exists(self.desktop_filename) return True
def is_installed(self): # check path and requirements if not super().is_installed: return False for required_file_path in self.required_files_path: if not os.path.exists(os.path.join(self.install_path, required_file_path)): logger.debug("{} binary isn't installed".format(self.name)) return False if self.desktop_filename: return launcher_exists(self.desktop_filename) logger.debug("{} is installed".format(self.name)) return True
def test_desktop_file_doesnt_exist(self): """Launcher file doesn't exists""" self.assertFalse(launcher_exists("foo.desktop"))
def test_desktop_file_exists(self): """Launcher exists""" self.write_desktop_file("foo.desktop") self.assertTrue(launcher_exists("foo.desktop"))