File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 11import pytest
22
3+ from conftest import assert_bash_exec
4+
35
46def is_int (s ):
57 try :
@@ -35,8 +37,20 @@ def test_4(self, completion):
3537 assert not completion
3638
3739 @pytest .mark .complete ("ps --pid " )
38- def test_5 (self , completion ):
40+ def test_5 (self , completion , bash ):
41+ ps_pid_output = assert_bash_exec (
42+ bash , "command ps ax -o pid=" , want_output = True
43+ )
44+ print (
45+ "\n =====PS output=====" ,
46+ ps_pid_output ,
47+ "\n ======PS output end=====" ,
48+ end = "" ,
49+ sep = "" ,
50+ )
3951 assert completion
52+ # Remove empty strings, macOS sometimes gives an empty line
53+ # pids = filter(None, completion)
4054 assert all (map (is_int , completion ))
4155
4256 @pytest .mark .complete ("ps --format " , require_cmd = True )
You can’t perform that action at this time.
0 commit comments