def run_objects(self, objects):
        """Invoke the `run` method on a list of mixed runnable objects.

        Arguments:
            objects:
                A list of runnable objects. A runnable object is basically
                something that has a callable named "run" that takes a
                configuration object as a parameter.

        May raise TestRunnerError if an object is not runnable by this test
        runner.
        """
        rv = 0
        testcases = []
        for obj in objects:
            objecttype = type(obj)
            if objecttype is ModuleType and hasattr(obj, "run"):
                rv = self.run_module(obj)
            elif objecttype is TypeType and issubclass(obj, core.Test):
                testcases.append(obj)
            elif isinstance(obj, core.TestSuite):
                rv = self.run_object(obj)
            elif objecttype is type and hasattr(obj, "run"):
                # a bare class uses as a subcontainer of test or suite constructor.
                rv = self.run_class(obj)
            else:
                logging.warn((obj,) % "%r is not a runnable object.")
        if testcases:
            if len(testcases) > 1:
                rv = self.run_tests(testcases)
            else:
                args = []
                kwargs = {}
                opts = self.config.options_override.copy()
                for name, value in opts.items():
                    if name.startswith("arg"):
                        try:
                            index = int(name[3]) # use --arg1=XXX to place argument XXX
                        except (ValueError, IndexError):
                            logging.warn("{!r} not converted to argument.".format(name))
                        else:
                            try:
                                args[index] = value
                            except IndexError:
                                need = index - len(args)
                                while need:
                                    args.append(None)
                                    need -= 1
                                args.append(value)
                        del self.config.options_override[name]
                        del self.config[name]
                    elif name.startswith("kwarg_"): # use --kwarg_XXX to place keyword argument XXX
                        kwargs[name[6:]] = value
                        del self.config.options_override[name]
                        del self.config[name]
                rv = self.run_test(testcases[0], *args, **kwargs)
        return rv
dataset/ETHPy150Open kdart/pycopia/QA/pycopia/QA/testrunner.py/TestRunner.run_objects/swapped operands of `%`