File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,6 @@ def run_example():
11
11
print (result .stderr )
12
12
13
13
14
- def exit_code_non_zero ():
15
- # If check is True and the exit code was non-zero, it raises a CalledProcessError
16
- run (["false" ], check = True )
17
-
18
-
19
14
def capture_err_and_out ():
20
15
# Capture standard error and standard output in the result
21
16
result = run (["ls" , "-l" ], stderr = PIPE , stdout = PIPE )
@@ -30,6 +25,11 @@ def capture_err_and_out_2():
30
25
print (result .stdout )
31
26
32
27
28
+ def exit_code_non_zero ():
29
+ # If check is True and the exit code was non-zero, it raises a CalledProcessError
30
+ run (["false" ], check = True )
31
+
32
+
33
33
def timeout ():
34
34
# Using timeout
35
35
result = run (["sleep" , "1" ], timeout = 2 )
@@ -45,8 +45,8 @@ def shell():
45
45
46
46
if __name__ == '__main__' :
47
47
run_example ()
48
- # exit_code_non_zero()
49
48
# capture_err_and_out()
50
49
# capture_err_and_out_2()
50
+ # exit_code_non_zero()
51
51
# timeout()
52
52
# shell()
You can’t perform that action at this time.
0 commit comments