Lines Matching refs:code

161         # check_call() function with zero return code
166 # check_call() function with non-zero return code
173 # check_output() function with zero return code
187 # check_call() function with non-zero return code
326 code = ('import sys; from subprocess import Popen, PIPE;'
330 p = subprocess.Popen([sys.executable, "-c", code],
672 code = ('import sys, subprocess; '
677 p = subprocess.Popen([sys.executable, "-c", code],
767 # code using pipesize=-1 should not crash.
1083 # code path is tested when the number of pipes is zero or one.
1127 code = ("import sys; "
1130 args = [sys.executable, '-c', code]
1132 # a different code path is used when the number of pipes is
1148 code = ("import sys; "
1150 args = [sys.executable, '-c', code]
1152 # a different code path is used when the number of pipes is
1318 code = textwrap.dedent(f"""
1337 cmd = [sys.executable, "-c", code]
1407 # triggers a different code path for better coverage.
1430 code = ';'.join((
1435 output = subprocess.check_output([sys.executable, '-c', code])
1483 for cmd, shell, code, sx in cases:
1485 p.returncode = code
1572 def run_python(self, code, **kwargs):
1573 """Run Python code in a subprocess using subprocess.run"""
1574 argv = [sys.executable, "-c", code]
1603 # capture stdout with zero return code
1746 code = textwrap.dedent("""\
1751 cp = subprocess.run([sys.executable, "-Xwarn_default_encoding", "-c", code],
1851 # Write the hex for the error code EISDIR: 'is a directory'
1910 # For code coverage of calling setsid(). We don't care if we get an
1928 # For code coverage of calling setpgid(). We don't care if we get an
1945 # For code coverage of the user parameter. We don't care if we get an
2219 # This tests the code that disables garbage collection if the child
2242 # The internal code did not preserve the previous exception when
2615 code = textwrap.dedent(r'''
2625 rc = subprocess.call([sys.executable, '-c', code, str(skipped_fd)],
3241 # Setting stdin and stdout forces the ._communicate() code path.
3256 # Setting stdin and stdout forces the ._communicate() code path.