Skip to content

test: more robust URL coverage; improve badly formed test#10270

Merged
rjsparks merged 3 commits intoietf-tools:mainfrom
jennifer-richards:test-tweak
Jan 16, 2026
Merged

test: more robust URL coverage; improve badly formed test#10270
rjsparks merged 3 commits intoietf-tools:mainfrom
jennifer-richards:test-tweak

Conversation

@jennifer-richards
Copy link
Member

@jennifer-richards jennifer-richards commented Jan 16, 2026

Main work here is to use Django's resolve() rather than applying our own regex matching to our url coverage test. This ensures that we're accounting for coverage that agrees with what Django is doing. Motivated because path URL patterns handle end-of-string anchors in a way that the old regex code does not account for, so overlapping URLs may be accounted incorrectly. That is, two patterns

  • ^api/purple/rfc/publish/
  • ^api/purple/rfc/publish/files/

may both match the URL api/purple/rfc/publish/files/ because the regexes don't have a trailing $. The path gearing applies the $, but our code did not.

Also fixes a random other test that was passing, but using unrealistic data.

@codecov
Copy link

codecov bot commented Jan 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.41%. Comparing base (31b3b82) to head (e119793).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #10270   +/-   ##
=======================================
  Coverage   88.40%   88.41%           
=======================================
  Files         324      324           
  Lines       43344    43344           
=======================================
+ Hits        38318    38322    +4     
+ Misses       5026     5022    -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rjsparks rjsparks merged commit 0b6e887 into ietf-tools:main Jan 16, 2026
10 checks passed
@jennifer-richards jennifer-richards deleted the test-tweak branch January 16, 2026 19:43
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 20, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants