Title: Lesson: Test classes should not have docstrings · Issue #1896 · usethis-python/usethis-python · GitHub
Open Graph Title: Lesson: Test classes should not have docstrings · Issue #1896 · usethis-python/usethis-python
X Title: Lesson: Test classes should not have docstrings · Issue #1896 · usethis-python/usethis-python
Description: Context When creating test classes for validate_or_raise, validate_or_default, validated_get, and ensure_get, each test class was given a docstring like """Tests for validate_or_raise.""". This is unnecessary and inconsistent with the pr...
Open Graph Description: Context When creating test classes for validate_or_raise, validate_or_default, validated_get, and ensure_get, each test class was given a docstring like """Tests for validate_or_raise.""". This is ...
X Description: Context When creating test classes for validate_or_raise, validate_or_default, validated_get, and ensure_get, each test class was given a docstring like """Tests for validate_or_rais...
Opengraph URL: https://github.com/usethis-python/usethis-python/issues/1896
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Lesson: Test classes should not have docstrings","articleBody":"## Context\n\nWhen creating test classes for `validate_or_raise`, `validate_or_default`, `validated_get`, and `ensure_get`, each test class was given a docstring like `\"\"\"Tests for validate_or_raise.\"\"\"`. This is unnecessary and inconsistent with the project's conventions.\n\n## Root Cause\n\nThe agent applied general Python best practices (all classes should have docstrings) to test classes, where docstrings are redundant since the class name already conveys the purpose.\n\n## Principle\n\n**Test classes should not have docstrings.** The class name (e.g., `TestValidateOrRaise`) already communicates what is being tested. Adding docstrings like `\"\"\"Tests for validate_or_raise.\"\"\"` is redundant. This applies to both top-level test classes and nested test classes.\n\n## Affected Skills\n\nThe `usethis-python-test` skill should include guidance: do not add docstrings to test classes. The class name is sufficient documentation.","author":{"url":"https://github.com/nathanjmcdougall","@type":"Person","name":"nathanjmcdougall"},"datePublished":"2026-04-08T02:54:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1896/usethis-python/issues/1896"}
| 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:77074f93-62b6-227f-1e47-093e3587548d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DB60:29AC78:2072E8F:2EF2708:6A4D08CA |
| html-safe-nonce | 6e6acfc65339a26cb706b7673f134b89b63f6ac3258fcf35e0b07984a9f78823 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjYwOjI5QUM3ODoyMDcyRThGOjJFRjI3MDg6NkE0RDA4Q0EiLCJ2aXNpdG9yX2lkIjoiMjYzNzUxNjUzMDM3NjMxMzAzNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 3fb95c8d4fa104b9f83701b574bcc0818d66951a6df6799854d0770a94061681 |
| hovercard-subject-tag | issue:4221760233 |
| 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/1896/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5aa9ab903ec6b3b86a19adc5db068045ce3c282927d8e43438d925ef494be05b/usethis-python/usethis-python/issues/1896 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5aa9ab903ec6b3b86a19adc5db068045ce3c282927d8e43438d925ef494be05b/usethis-python/usethis-python/issues/1896 |
| og:image:alt | Context When creating test classes for validate_or_raise, validate_or_default, validated_get, and ensure_get, each test class was given a docstring like """Tests for validate_or_raise.""". This is ... |
| 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 | 31e4db13a9e20081f2fac78f441659a6576e582bbb15e153f9c7fb6473aa29f5 |
| 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 | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width