def _foreachPlatform(self, *args, **kwargs): code = kwargs.get('code', 0) loadPlatforms() for platform in getPlatforms(): key = platform.SID[0] if platform.SID else platform.SKU[0] args = ['-p', key, '-s'] + list(args) self._runMain(args, code)
def testPlatformInstance(self): platform.loadPlatforms() for cls in platform.getPlatforms(): if not issubclass(cls, FixedSystem): continue cls()
def testPlatformInfo(self): platform.loadPlatforms() for cls in platform.getPlatforms(): self.assertIsInstance(cls.PLATFORM, (type(None), str)) self.assertIsInstance(cls.SID, list) self.assertIsInstance(cls.SKU, list)
def setUpClass(cls): cls.logger = getLogger(cls.__name__) cls.inventories = {} for name, platform in getPlatforms().items(): assert platform cls.logger.info('Testing init for platform %s', name) platformObj = platform() assert platformObj cls.logger.info('Setting inventory for platform %s', name) inventory = platformObj.getInventory() assert inventory cls.inventories[name] = inventory cls.ledColors = ['off', 'green', 'red', 'yellow']
def testSetup(self): for name, platform in getPlatforms().items(): self.logger.info('Testing setup for platform %s', name) platform = platform() platform.setup()