From fe5737b4100f9ece6ae05621f80259c178709a34 Mon Sep 17 00:00:00 2001 From: Lukas Ruzicka Date: Sep 06 2018 11:35:41 +0000 Subject: Add method to check installed module. --- diff --git a/modular_functions.py b/modular_functions.py index b3ada73..b6883f0 100755 --- a/modular_functions.py +++ b/modular_functions.py @@ -164,6 +164,16 @@ class ModuleTest: self.overall['list'] = 'fail' return(result) + def check_install(self, module, stream): + print('-------- Checking for module in list --------') + key = f"{module}:{stream}" + res1 = self.suite.is_listed(module, stream, 'installed') + if res1[key] == 'pass': + self.overall['checkinstall'] = 'pass' + else: + self.overall['checkinstall'] = 'fail' + print(' ') + def enable_module(self, module, stream): print('-------- Enable module ---------') @@ -287,6 +297,8 @@ class ModuleTest: self.switch_stream(module, stream, newer) elif s == 'list': self.list_module(module, stream) + elif s == 'checkinstall': + self.check_install(module, stream) class Parser: def __init__(self):