def setUp(self):
        # create the info file for an OS plugin
        self.os_info_file = tempfile.NamedTemporaryFile(mode='w', suffix='.info', prefix='ifut-')
        json.dump(INFO1, self.os_info_file)
        self.os_info_file.flush()
        os.fsync(self.os_info_file)
        self.os_plugin_name = os.path.basename(self.os_info_file.name).partition('.')[0]
        # create a module for this plugin
        os.mkdir(os.path.join(tempfile.gettempdir(), self.os_plugin_name), 0744)
        osclass = open(os.path.join(tempfile.gettempdir(), self.os_plugin_name, self.os_plugin_name + '.py'), 'w')
        osclass.write('class %s(object):\n    pass' % self.os_plugin_name)
        osclass.close()
        osinit = open(os.path.join(tempfile.gettempdir(), self.os_plugin_name, '__init__.py'), 'w')
        osinit.write('from %s import %s as delegate_class' % (self.os_plugin_name, self.os_plugin_name))
        osinit.close()
        # create the info file for a CLOUD plugin
        self.cloud_info_file = tempfile.NamedTemporaryFile(mode='w', suffix='.info', prefix='ifut-')
        json.dump(INFO2, self.cloud_info_file)
        self.cloud_info_file.flush()
        os.fsync(self.cloud_info_file)
        self.cloud_plugin_name = os.path.basename(self.cloud_info_file.name).partition('.')[0]
        # create a module for this plugin
        os.mkdir(os.path.join(tempfile.gettempdir(), self.cloud_plugin_name), 0744)
        cloudclass = open(os.path.join(tempfile.gettempdir(), self.cloud_plugin_name, self.cloud_plugin_name + '.py'), 'w')
        cloudclass.write('class %s(object):\n    pass' % self.cloud_plugin_name)
        cloudclass.close()
        cloudinit = open(os.path.join(tempfile.gettempdir(), self.cloud_plugin_name, '__init__.py'), 'w')
        cloudinit.write((self.cloud_plugin_name, self.cloud_plugin_name) % 'from %s import %s as delegate_class')
        cloudinit.close()
        # get a PluginManager instance and load plugin .info files
        self.plugin_mgr = PluginManager(plugin_path=tempfile.gettempdir())
        self.plugin_mgr.load()
dataset/ETHPy150Open redhat-imaging/imagefactory/tests/testPluginManager.py/testPluginManager.setUp/swapped operands of `%`