Skip to content

Rename auth test files so pytest collects them#3944

Merged
lunkwill42 merged 1 commit intomasterfrom
fix/rename-auth-test-files
Mar 27, 2026
Merged

Rename auth test files so pytest collects them#3944
lunkwill42 merged 1 commit intomasterfrom
fix/rename-auth-test-files

Conversation

@lunkwill42
Copy link
Copy Markdown
Member

Scope and purpose

backends_tests.py and remote_user_tests.py use a *_tests.py suffix that doesn't match pytest's default collection patterns (test_*.py / *_test.py), so they were silently skipped during test discovery. This renames both to *_test.py, matching the convention used in the rest of the repo. The directory now collects 15 tests instead of 3.

Contributor Checklist

  • Added a changelog fragment for towncrier
  • Added/amended tests for new/changed code
  • Added/changed documentation
  • Linted/formatted the code with ruff, easiest by using pre-commit
  • Wrote the commit message so that the first line continues the sentence "If applied, this commit will ...", starts with a capital letter, does not end with punctuation and is 50 characters or less long. See https://cbea.ms/git-commit/
  • Based this pull request on the correct upstream branch: For a patch/bugfix affecting the latest stable version, it should be based on that version's branch (<major>.<minor>.x). For a new feature or other additions, it should be based on master.
  • If applicable: Created new issues if this PR does not fix the issue completely/there is further work to be done
  • If it's not obvious from a linked issue, described how to interact with NAV in order for a reviewer to observe the effects of this change first-hand (commands, URLs, UI interactions)
  • If this results in changes in the UI: Added screenshots of the before and after
  • If this adds a new Python source code file: Added the boilerplate header to that file

The files `backends_tests.py` and `remote_user_tests.py` use a
`*_tests.py` suffix which doesn't match pytest's default
`test_*.py` or `*_test.py` patterns. They were silently skipped
during normal test discovery.
@lunkwill42 lunkwill42 self-assigned this Mar 27, 2026
@lunkwill42 lunkwill42 requested a review from a team March 27, 2026 09:28
@lunkwill42 lunkwill42 added the nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes) label Mar 27, 2026
@sonarqubecloud
Copy link
Copy Markdown

@github-actions
Copy link
Copy Markdown

Test results

    7 files      7 suites   13m 53s ⏱️
2 968 tests 2 968 ✅ 0 💤 0 ❌
8 721 runs  8 721 ✅ 0 💤 0 ❌

Results for commit 612c216.

@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 64.06%. Comparing base (ad2012b) to head (612c216).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3944      +/-   ##
==========================================
+ Coverage   63.97%   64.06%   +0.09%     
==========================================
  Files         627      627              
  Lines       46369    46386      +17     
  Branches       43       43              
==========================================
+ Hits        29663    29718      +55     
+ Misses      16696    16658      -38     
  Partials       10       10              

☔ 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.

@lunkwill42 lunkwill42 merged commit d7cd389 into master Mar 27, 2026
20 of 21 checks passed
@lunkwill42 lunkwill42 deleted the fix/rename-auth-test-files branch March 27, 2026 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

nonews No news fragment is necessary for this PR (e.g. refactoring, cleanups, workflow/development changes)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants