Skip to content

docs(tests): add docstrings and inline comments to test_configs.py - #4215

Open
M-Colley wants to merge 1 commit into
plotly:devfrom
M-Colley:fix/issue-3194-test-configs-docstrings
Open

M-Colley wants to merge 1 commit into
plotly:devfrom
M-Colley:fix/issue-3194-test-configs-docstrings

Conversation

@M-Colley

Copy link
Copy Markdown
Contributor

Thirty-five of the thirty-seven test functions in tests/unit/test_configs.py lacked docstrings and inline comments. Consequently, contributors had to read dash/_configs.py, dash/_get_paths.py, and dash/dash.py to determine configuration precedence, prefix rules, and server startup mocks.

This change adds a single-line docstring to each undocumented test function in tests/unit/test_configs.py. In addition, inline comments clarify skipped route assertions, prefix slash rules, mocked HTTP server startup, read-only configuration locks, and invalid-port checks during dev tools setup.

Syntax compilation with py_compile passed without errors. Furthermore, AST inspection confirmed docstrings on all 37 test functions, and ruff lint checks (E, F, W, B) reported zero violations.

Fixes #3194.

Add concise docstrings to all 35 undocumented test functions in
tests/unit/test_configs.py and clarify non-obvious setup steps with
inline comments.

Fixes plotly#3194.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_configs file is missing docstrings

1 participant