Skip to content

Use typing_extensions Sentinel for NOT_PASSED in parameter tests - #8706

Merged
Jens Hedegaard Nielsen (jenshnielsen) merged 1 commit into
microsoft:mainfrom
jenshnielsen:tests-not-passed-sentinel
Nov 2, 2026
Merged

Jens Hedegaard Nielsen (jenshnielsen) merged 1 commit into
microsoft:mainfrom
jenshnielsen:tests-not-passed-sentinel

Conversation

@jenshnielsen

Copy link
Copy Markdown
Collaborator

Replace the Literal["NOT_PASSED"] string marker with a typing_extensions Sentinel, compare by identity, and require typing_extensions>=4.16.0 for the test extra.

Replace the Literal["NOT_PASSED"] string marker with a typing_extensions
Sentinel, compare by identity, and require typing_extensions>=4.16.0 for
the test extra.
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.05%. Comparing base (7d4c4fa) to head (78c9505).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8706   +/-   ##
=======================================
  Coverage   75.05%   75.05%           
=======================================
  Files         307      307           
  Lines       32545    32545           
=======================================
  Hits        24426    24426           
  Misses       8119     8119           

☔ View full report in Codecov by Harness.
📢 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The PR is missing the required newsfragment describing the sentinel migration and updated test dependency.

1 open issue
What changed in this PR

This PR replaces the string-based NOT_PASSED marker with a typing_extensions.Sentinel in QCoDeS parameter tests, preserving the distinction between omitted arguments and explicit values.

Changes:

  • Define a shared sentinel and update fixture and test annotations.
  • Use identity comparisons when checking for omitted arguments.
  • Require typing_extensions>=4.16.0 in the test extra.
File Description
tests/​parameter/​test_snapshot.py Update snapshot test annotations and sentinel comparisons.
tests/​parameter/​test_parameter_cache.py Update cache test annotations and sentinel comparisons.
tests/​parameter/​conftest.py Define the sentinel and update fixture return types.
pyproject.toml Add the minimum test dependency for sentinel support.

Review effort: Balanced

Comment thread pyproject.toml Resolved
Merged via the queue into microsoft:main with commit 1666f9e Nov 2, 2026
19 checks passed
@jenshnielsen
Jens Hedegaard Nielsen (jenshnielsen) deleted the tests-not-passed-sentinel branch November 2, 2026 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants