Commit 9c57b6b
committed
Fix tests/test_pt_utils.py by adding completion_header to MockCmd
The previous commit introduced accessing self.cmd_app.completion_header
in Cmd2Completer.get_completions, which caused AttributeError in tests
using MockCmd because it lacked this attribute.
This commit adds completion_header to MockCmd and includes a new test case
test_get_completions_with_header to verify that the completion header is
correctly printed when present.1 parent 20dae38 commit 9c57b6b
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
150 | 167 | | |
151 | 168 | | |
152 | 169 | | |
| |||
0 commit comments