Repository navigation
TEST: Assert Registry.get_registry_singleton return types (P311-04) - #3770
Merged
Roman Lutz (romanlutz) merged 11 commits intoNov 1, 2026
Merged
Roman Lutz (romanlutz) merged 11 commits into
Roman Lutz (romanlutz) merged 11 commits into
Conversation
Add assert_type checks for SlowConstructingRegistry and OtherSlowConstructingRegistry singleton results so the Self return type is covered by the type checker, alongside the existing identity and isinstance checks.
Roman Lutz (romanlutz)
approved these changes
Nov 1, 2026
9 of 25 tasks
…-singleton-assert-type
Count _map_hierarchy_node calls instead of asserting elapsed < 0.05s, which failed intermittently on loaded CI runners.
…rAnwar/PyRIT into test/registry-singleton-assert-type
Contributor
Author
|
Hello Roman Lutz (@romanlutz) , One test failed with summary as below: I've fixed the test and pushed it. Please review it here: Thanks. Moreover, I'll wait in case I am assigned the issue related to this PR, if yes then it'll be all good to go |
Roman Lutz (romanlutz)
added a commit
to FazeelUsmani/PyRIT
that referenced
this pull request
Nov 1, 2026
Integrate microsoft#3770, microsoft#3697 and microsoft#3695 normally. As requested, retain the upstream deterministic one-node mapping-budget assertion, truncation and exact totals; do not restore the removed wall-clock benchmark. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
assert_typeforRegistry.get_registry_singletonintests/unit/registry/test_registry.py.Selfreturn type resolves to the concrete subclass for bothSlowConstructingRegistry(same-class convergence test) andOtherSlowConstructingRegistry(unrelated-class isolation test).isinstancechecks; no production code, synchronization, or public signatures change.Verification
pytest tests/unit/registry/test_registry.py: 29 passed.ty check tests/unit/registry/test_registry.py: all checks passed.tyreporttype-assertion-failure.Part of #3166 (Item P311-04)