Exemple #1
0
 def popen_output(self, args, cwd=None, report=True):
     if isinstance(args, str):
         args = std.shlex.split(args)
     assert args[0], args
     args = [str(x) for x in args]
     if cwd == None:
         cwd = self.cwd
     if report:
         self.report_popen(args, cwd)
     return check_output(args, cwd=str(cwd))
Exemple #2
0
 def popen_output(self, args, cwd=None, report=True):
     if isinstance(args, str):
         args = std.shlex.split(args)
     assert args[0], args
     args = [str(x) for x in args]
     if cwd == None:
         cwd = self.cwd
     if report:
         self.report_popen(args, cwd)
     return check_output(args, cwd=str(cwd))
Exemple #3
0
 def popen_output(self, args, cwd=None, report=True):
     if isinstance(args, str):
         args = std.shlex.split(args)
     assert args[0], args
     args = [str(x) for x in args]
     if cwd == None:
         cwd = self.cwd
     cmd = py.path.local.sysfind(args[0])
     if not cmd:
         self.fatal("command not found: %s" % args[0])
     args[0] = str(cmd)
     if report:
         self.report_popen(args, cwd)
     return check_output(args, cwd=str(cwd))
Exemple #4
0
def test_checkoutput_error(hg):
    with pytest.raises(CalledProcessError):
        check_output([hg, "qlwkje"])
Exemple #5
0
def test_check_output(hg):
    assert check_output([hg, "--version"])
Exemple #6
0
 def check_output(self, args):
     args = self._getargs(args)
     self.tw.line("$ %s [captured]" % " ".join(args))
     return check_output(args)
Exemple #7
0
 def check_output(self, args):
     args = self._getargs(args)
     self.tw.line("$ %s [captured]" % " ".join(args))
     return check_output(args)