Title: fix: replace substring checks with exact equality for all console output assertions by Copilot · Pull Request #1887 · usethis-python/usethis-python · GitHub
Open Graph Title: fix: replace substring checks with exact equality for all console output assertions by Copilot · Pull Request #1887 · usethis-python/usethis-python
X Title: fix: replace substring checks with exact equality for all console output assertions by Copilot · Pull Request #1887 · usethis-python/usethis-python
Description: Substring checks (assert "..." in out) in console output tests hide missing messages and silently pass when unexpected extra output is present. This converts all such checks to exact equality (assert out == "..."), making test failures immediately visible when output changes. Test changes Converted assert "..." in out → assert out == "..." across 10 test files: test_core_tool.py — requirements.txt, tach (full multi-line), ty output test_ruff.py — select_rules message, linter/formatter print_how_to_use (4 cases) test_coverage_py.py — print_how_to_use with poetry backend (2 cases) test_core_badge.py — encoding warning + badge markdown fallback (multi-line) test_call.py (uv/poetry) — single and multi-line stderr warning surfacing test_deps.py — frozen-mode install messages test_browse.py, test_console.py, test_yaml_io_.py — single-line messages Multi-line output asserted as a single combined string: # Before assert "Writing 'tach.toml'." in out # After assert out == ( "✔ Adding dependency 'tach' to the 'dev' group in 'pyproject.toml'.\n" "☐ Install the dependency 'tach'.\n" "✔ Writing 'tach.toml'.\n" "✔ Adding Tach config to 'tach.toml'.\n" "☐ Run 'uv run tach check' to run Tach.\n" ) Intentionally kept as substring checks Rich table output (test_list.py, TestTablePrint) — rendered format depends on terminal width test_unpinned_dep_warning_surfaced — actual uv warning text varies by version "Poetry" in output in poetry call tests — tests subprocess return value, not console output Documentation AGENTS.md: Strengthened usethis-python-test-full-coverage wording from "ALWAYS consider" to "ALWAYS invoke — mandatory for any code change, without exception" usethis-python-test skill (v1.2 → v1.3): Added "Asserting console output" section — exact equality rule, explicit backend requirement, multi-line pattern, # noqa: RUF001 placement, and table exception
Open Graph Description: Substring checks (assert "..." in out) in console output tests hide missing messages and silently pass when unexpected extra output is present. This converts all such checks to exact equa...
X Description: Substring checks (assert "..." in out) in console output tests hide missing messages and silently pass when unexpected extra output is present. This converts all such checks to ex...
Opengraph URL: https://github.com/usethis-python/usethis-python/pull/1887
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:03b26f18-62b1-5c6f-fae9-ec1973068844 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8424:1D90CC:149D8C9:1BFE6FA:6A4EFD64 |
| html-safe-nonce | 12054cb06203a36d321f44ef787604a3a8d774aefb746cb0f958e10b76ffcbac |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NDI0OjFEOTBDQzoxNDlEOEM5OjFCRkU2RkE6NkE0RUZENjQiLCJ2aXNpdG9yX2lkIjoiMTYwODQzNTk0MDk4Mzc2NjM3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 201c726eecfaefb274597de72355fb92afff5f395e814306e63aee0c88a35996 |
| hovercard-subject-tag | pull_request:3500661070 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/usethis-python/usethis-python/pull/1887/files |
| twitter:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1143301?s=400&v=4 |
| og:image:alt | Substring checks (assert "..." in out) in console output tests hide missing messages and silently pass when unexpected extra output is present. This converts all such checks to exact equa... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b8f23afb982271f1b22258a94aede67a6b77760 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width