Skip to content

Bugfix: Looping LinSweepers#7607

Merged
esbenh4 merged 2 commits intomicrosoft:mainfrom
samantha-ho:samanthaho/bugfix_nested_LinSweeper
Oct 31, 2025
Merged

Bugfix: Looping LinSweepers#7607
esbenh4 merged 2 commits intomicrosoft:mainfrom
samantha-ho:samanthaho/bugfix_nested_LinSweeper

Conversation

@samantha-ho
Copy link
Contributor

@samantha-ho samantha-ho commented Oct 30, 2025

This PR fixes a bug in the LinSweeper iterator which causes it to continually raise StopIteration when the iteration sequence has completed once. The bug prevents meausrement code from nesting LinSweeper objects by causing the inner loop to fail repeatedly once it has finished a single sweep.

The solution is to reset the internal iteration index to 0 before raising StopIteration. This allows a subsequent call to __next__ to start over at the beginning of the sweep.

@samantha-ho samantha-ho requested a review from a team as a code owner October 30, 2025 18:45
@codecov
Copy link

codecov bot commented Oct 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 59.74%. Comparing base (3e2ce53) to head (0ffea17).
⚠️ Report is 9 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7607   +/-   ##
=======================================
  Coverage   59.74%   59.74%           
=======================================
  Files         351      351           
  Lines       31651    31652    +1     
=======================================
+ Hits        18909    18910    +1     
  Misses      12742    12742           

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

@esbenh4 esbenh4 added this pull request to the merge queue Oct 31, 2025
Merged via the queue into microsoft:main with commit acbc73b Oct 31, 2025
16 checks passed
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.

2 participants