Fix AttributeError in docstring meta init and improve test isolation across shell tests#43
Merged
RobertBlackhart merged 2 commits intoApr 17, 2026
Conversation
…ell tests Agent-Logs-Url: https://github.com/NetApp/recline/sessions/f54164fb-39cc-4b8c-bfa9-2cc5f0d302cb Co-authored-by: RobertBlackhart <5414318+RobertBlackhart@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix AttributeError in command_class.docstring.meta initialization
Fix AttributeError in docstring meta init and improve test isolation across shell tests
Apr 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
command_class.docstring.metawas only initialized insideif args or kwargs:, causing anAttributeErrorwhen a command had examples but no args/kwargs. Several shell tests also shared the same command name"single command", risking cross-test registry pollution with no cleanup.test_man_utils.pydocstring.meta = []unconditionally before the conditional append, fixing theAttributeErrorpathtest_shell.py"single command dash c","single command non repl","single command one shot","single command sys argv") to eliminate inter-test interferencesingle_commandfunctions tosingle_cmdto avoid shadowing the outersingle_commandkwarg inrelax()try/finallycleanup intest_run_with_dash_cwith pre/post assertions onCOMMAND_REGISTRYmonkeypatch.setattr(bc, "debug", lambda: debug_called.__setitem__(0, True))with a namedmock_debug()closuremonkeypatch.setitem(recline.commands.COMMAND_REGISTRY, ...)intest_run_one_command_command_cancelledso pytest handles teardown automaticallyOriginal prompt