def test_r_is_installed(self): """ Test checking that R is installed """ self.assertIsNone(RUtils.check_r_is_installed()) ProcessingConfig.setSettingValue(RUtils.R_FOLDER, '/home') self.assertTrue(RUtils.check_r_is_installed()) self.assertIn('R is not installed', RUtils.check_r_is_installed()) ProcessingConfig.setSettingValue(RUtils.R_FOLDER, None) self.assertIsNone(RUtils.check_r_is_installed())
def canExecute(self): """ Returns True if the algorithm can be executed """ if self.error: return False, self.error msg = RUtils.check_r_is_installed() if msg is not None: return False, msg return True, ''