Title: agent: test cases for dict-valued setters should cover multiple key-path depths combined with multiple nesting levels · Issue #1864 · usethis-python/usethis-python · GitHub
Open Graph Title: agent: test cases for dict-valued setters should cover multiple key-path depths combined with multiple nesting levels · Issue #1864 · usethis-python/usethis-python
X Title: agent: test cases for dict-valued setters should cover multiple key-path depths combined with multiple nesting levels · Issue #1864 · usethis-python/usethis-python
Description: What happened When adding tests for a feature that sets a dict value at a key path, only cases with either multiple keys in the path OR nested dict values were tested — not both together. The reviewer had to request an additional test co...
Open Graph Description: What happened When adding tests for a feature that sets a dict value at a key path, only cases with either multiple keys in the path OR nested dict values were tested — not both together. The revie...
X Description: What happened When adding tests for a feature that sets a dict value at a key path, only cases with either multiple keys in the path OR nested dict values were tested — not both together. The revie...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/1864
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"agent: test cases for dict-valued setters should cover multiple key-path depths combined with multiple nesting levels","articleBody":"## What happened\n\nWhen adding tests for a feature that sets a dict value at a key path, only cases with either multiple keys in the path OR nested dict values were tested — not both together. The reviewer had to request an additional test combining multiple keys in the path with a multiply nested dict value.\n\n## Root cause\n\nWhen writing tests for a composite feature (path traversal + nested values), it is easy to focus each test on varying one dimension at a time (key-path depth, value nesting depth) without including a case that varies both simultaneously. This leaves a gap: the interaction between a deep path and a deeply nested value is untested.\n\n## Generalised principle\n\nWhen writing tests for a feature that has two or more independent axes of variation (e.g. path depth and value nesting), always include at least one test that exercises multiple non-trivial values on both axes at the same time. Varying one axis at a time is necessary but not sufficient for full coverage of the combined behaviour.\n\n## Resolution\n\nAdded `test_set_deep_path_with_nested_dict_value` which uses `keys=[\"tool\", \"ruff\"]` (two-key path) together with a doubly nested dict value (`{\"lint\": {\"select\": [\"A\"], \"pydocstyle\": {\"convention\": \"pep257\"}}}`).\n\n## Follow-up\n\nConsider creating an agent skill or adding guidance to the existing test-writing skill about identifying independent axes of variation in features and ensuring cross-axis test combinations are included.","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2026-04-07T17:51:49.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/1864/usethis-python/issues/1864"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:fca28b53-e6e5-a975-1cb1-b88f110ae1ab |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CCB4:13DDC4:574B10C:7B038D0:6A4FAFFB |
| html-safe-nonce | eb768304d6904e996dd8923af17548cdf55d14cc525576bd039cf463b8881d0b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0I0OjEzRERDNDo1NzRCMTBDOjdCMDM4RDA6NkE0RkFGRkIiLCJ2aXNpdG9yX2lkIjoiMjE3Mjg4NTgxNzI0Mzk3MTU3OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 0b34edea4f620573b3d5cd717963e5432d131f4591b838705dd494de2c0f48c2 |
| hovercard-subject-tag | issue:4219587235 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/usethis-python/usethis-python/1864/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c0c310c481aa493eb3b7966506dc16c44ca6e6dacad9d64c2d53f4a18da4ad3d/usethis-python/usethis-python/issues/1864 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c0c310c481aa493eb3b7966506dc16c44ca6e6dacad9d64c2d53f4a18da4ad3d/usethis-python/usethis-python/issues/1864 |
| og:image:alt | What happened When adding tests for a feature that sets a dict value at a key path, only cases with either multiple keys in the path OR nested dict values were tested — not both together. The revie... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nathanjmcdougall |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| go-import | github.com/usethis-python/usethis-python git https://github.com/usethis-python/usethis-python.git |
| octolytics-dimension-user_id | 216362695 |
| octolytics-dimension-user_login | usethis-python |
| octolytics-dimension-repository_id | 842189705 |
| octolytics-dimension-repository_nwo | usethis-python/usethis-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 842189705 |
| octolytics-dimension-repository_network_root_nwo | usethis-python/usethis-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width