Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow fixtures to override values of globals and other fixtures #30

Merged
merged 1 commit into from
Oct 15, 2024

Conversation

freider
Copy link
Collaborator

@freider freider commented Sep 23, 2024

also some dependency flexibility

@freider
Copy link
Collaborator Author

freider commented Sep 23, 2024

@prbot approve

Copy link

@modal-pr-review-automation modal-pr-review-automation bot left a comment

Choose a reason for hiding this comment

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

Approved 👍. @mwaskom will follow-up review this.

@freider freider merged commit bd1617c into main Oct 15, 2024
6 checks passed
@freider freider deleted the freider/allow-override-of-globals branch October 15, 2024 13:37
@@ -69,8 +69,7 @@ def runtest(self):
# Since these are not actual functions with arguments, the only
# arguments that should appear in self.funcargs are the filled fixtures
for argname, value in self.funcargs.items():
if argname not in all_globals:
all_globals[argname] = value
all_globals[argname] = value
Copy link

Choose a reason for hiding this comment

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

Naive question as I haven't read much of the context but will this update persist / leak to other tests? Should we initialize all_globals from a copy of the mod.__dict__ instead?

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