Fix requirements using locals of a top-level modular scenario#455
Merged
Fix requirements using locals of a top-level modular scenario#455
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #455 +/- ##
==========================================
+ Coverage 89.71% 89.73% +0.02%
==========================================
Files 48 48
Lines 13194 13211 +17
==========================================
+ Hits 11837 11855 +18
+ Misses 1357 1356 -1
🚀 New features to boost your workflow:
|
Eric-Vin
approved these changes
Apr 16, 2026
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.
Description
Fixes #392, wherein an internal error resulted when a
requirestatement in a modular scenario referred to one of the scenario's local variables. The bug actually only happened when the modular scenario was at the top level, not invoked in thecomposeblock of another scenario, but I've added tests for both cases.Issue Link
Fixes #392.
Checklist
pytestand/or other meansAdditional Notes
This PR only fixes the specific issue in #392, but I think same kind of issue will happen when other kinds of mutable objects are used inside requirements, e.g. dicts. I'm not sure how to fix the problem in all cases, so I will leave it for a future PR.