Verifies app.last_result when it contains a dictionary of HistoryItems
(app: cmd2.Cmd, expected_length: int)
| 18 | |
| 19 | |
| 20 | def verify_hi_last_result(app: cmd2.Cmd, expected_length: int) -> None: |
| 21 | """Verifies app.last_result when it contains a dictionary of HistoryItems""" |
| 22 | assert len(app.last_result) == expected_length |
| 23 | |
| 24 | # Make sure last_result items match their respective indexes in the real history |
| 25 | for key in app.last_result: |
| 26 | # Keys in app.last_result are 1-based indexes into the app.history list |
| 27 | assert app.last_result[key] == app.history[key - 1] |
| 28 | |
| 29 | |
| 30 | # |
no outgoing calls
no test coverage detected
searching dependent graphs…