Repository navigation
Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Did you check coverage? Do you have a before and after? |
|
@StanFromIreland, Yes, it was 75% before; now it’s 100%. |
|
Can you actually show the coverage report? |
|
@StanFromIreland, I have an HTML coverage report (index.html). If it works for you, I can attach screenshots of the "before" and "after" results here! |
|
Sure. |
|
Ok, I’ll send it later. |
|
@StanFromIreland, Are the screenshots okay? |


This PR adds unit tests for the
cmdmodule inLib/test/test_cmd.py, increasing test coverage from 75% to 100%.Summary of added tests
parseline: handling commands starting with!.completedefault: verifying the default empty list return value.cmdloop: configuringcompletekeywithreadlineandeditlinebackends, handling missingreadline, printingintro, and reading viabuiltins.input(includingEOFError).onecmd: dispatching unrecognized commands todefault().complete: testing completion states (0,1, and non-matching buffers).do_help: handling empty docstrings (cleandoc) and filtering duplicate command names.print_topics: handling an emptyruler.columnize: formatting an empty list (<empty>) and raisingTypeErrorfor non-string items.Also sorted the top-level imports alphabetically according to PEP 8.