Skip to content

Fix tests to not rely on -Wdefault option#3591

Merged
Rowlando13 merged 1 commit into
pallets:stablefrom
kdeldycke:idiomatic-exception-check
Jun 13, 2026
Merged

Fix tests to not rely on -Wdefault option#3591
Rowlando13 merged 1 commit into
pallets:stablefrom
kdeldycke:idiomatic-exception-check

Conversation

@kdeldycke

@kdeldycke kdeldycke commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

Use a context manager to explicitly check for the exception message.

This is a non-idiomatic way of checking the behavior that rely on running tests with -Wdefault option. It was introduced by me in #3404 (commit 0f71fe7).

Closes #3476.

@kdeldycke kdeldycke linked an issue Jun 13, 2026 that may be closed by this pull request
@kdeldycke kdeldycke changed the title Idiomatic exception check Fix tests to not rely on -Wdefault option Jun 13, 2026
@kdeldycke kdeldycke added this to the 8.4.2 milestone Jun 13, 2026
@kdeldycke kdeldycke added bug f:test runner feature: cli test runner labels Jun 13, 2026
@Rowlando13 Rowlando13 merged commit 916883a into pallets:stable Jun 13, 2026
12 checks passed
oojBuffalo pushed a commit to oojBuffalo/scrolls that referenced this pull request Jun 14, 2026
…DR 0084)

A saved github.com/<owner>/<repo>/issues/<n> or /pull/<n> URL collapsed to
the repo and produced its README scroll, discarding the discussion. Extend
the github source to cover issue/PR threads as a second content kind:
identity owner/repo#<n> (GitHub's cross-ref notation), the adapter
dispatching on the '#' — the huggingface one-source-many-kinds shape, not
gist's own-source split, since an issue lives on github.com/api.github.com
and extends the repo's id, keeping the repo path byte-unchanged.

- detect: /issues/<n> and the web PR path /pull/<n> (all-digit) → owner/repo#<n>;
  deep thread links dedupe, while /blob, /tree, the /issues,/pulls lists, and
  /pull/new still collapse to owner/repo.
- adapter: the issues endpoint serves both kinds (a PR carries pull_request);
  one GET fetches the thread, comments a second GET (?per_page=100) only when
  present, degrading to body-only. Markdown body + bylined comments →
  extracted_text; labels → concepts (the github-topics rule); kind + state
  (issue/pull request, open/closed/merged via pull_request.merged_at) → tags;
  github.com/<owner>/<repo> link → the issue↔repo edge + body-URL scan.
- classify: github → project now applies only to repos; a '#'-bearing id is
  unclassified like HN/Lobsters/Discourse, falling through to title rules
  (a "how to" issue is still a tutorial).

Live keyless-verified: psf/requests#1, pallets/flask#5004 (label cli → concept),
and merged PR pallets/click#3591 (tags ['pull request','merged']); end-to-end
ingest leaves an unclassified thread scroll with the issue↔repo graph edge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@kdeldycke kdeldycke deleted the idiomatic-exception-check branch June 14, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug f:test runner feature: cli test runner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_flag_group_competition_duplicate_option_name relies on -Werror

2 participants