Skip to content

Commit 360266b

Browse files
committed
DEBUG: test ps output
1 parent 4852c1c commit 360266b

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/t/test_ps.py

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import pytest
22

3+
from conftest import assert_bash_exec
4+
35

46
def 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)

0 commit comments

Comments
 (0)