def command_line(args): """Run `args` through the CoverageScript command line. Returns the return code from CoverageScript.command_line. """ script = CoverageScript() ret = script.command_line(shlex.split(args)) return ret
def command_line(args, **kwargs): """Run `args` through the CoverageScript command line. `kwargs` are the keyword arguments to the CoverageScript constructor. Returns the return code from CoverageScript.command_line. """ script = CoverageScript(**kwargs) ret = script.command_line(shlex.split(args)) return ret
def command_line(self, args, ret=OK, _covpkg=None): """Run `args` through the command line. Use this when you want to run the full coverage machinery, but in the current process. Exceptions may be thrown from deep in the code. Asserts that `ret` is returned by `CoverageScript.command_line`. Compare with `run_command`. Returns None. """ script = CoverageScript(_covpkg=_covpkg) ret_actual = script.command_line(shlex.split(args)) self.assertEqual(ret_actual, ret)
def command_line(self, args, ret=OK, _covpkg=None): """Run `args` through the command line. Use this when you want to run the full coverage machinery, but in the current process. Exceptions may be thrown from deep in the code. Asserts that `ret` is returned by `CoverageScript.command_line`. Compare with `run_command`. Returns None. """ script = CoverageScript(_covpkg=_covpkg) ret_actual = script.command_line(shlex.split(args)) self.assertEqual(ret_actual, ret)