File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,27 @@ def test_file_handles_run(self):
40
40
if file_binary_write .exists ():
41
41
file_binary_write .unlink ()
42
42
43
+ def test_file_handles_run_pipe (self ):
44
+ try :
45
+ self .assertTrue (file_text .exists ())
46
+ self .assertTrue (file_binary .exists ())
47
+ with open (file_text , "r" , encoding = "utf-8" ) as f :
48
+ _ , stderr , retcode = run_command (
49
+ "file_handles" ,
50
+ "-" ,
51
+ file_text_write ,
52
+ file_binary ,
53
+ file_binary_write ,
54
+ stdin = f ,
55
+ )
56
+ self .assertEqual (retcode , 0 , stderr )
57
+ finally :
58
+ # Clean up the files created during the test
59
+ if file_text_write .exists ():
60
+ file_text_write .unlink ()
61
+ if file_binary_write .exists ():
62
+ file_binary_write .unlink ()
63
+
43
64
def test_file_handles_call (self ):
44
65
try :
45
66
self .assertTrue (file_text .exists ())
You can’t perform that action at this time.
0 commit comments