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

[bugfix] Fix error in fixture resolution when multiple fixtures of the same class are instantiated with different variables #3326

Merged
merged 3 commits into from
Dec 5, 2024

Conversation

tom91136
Copy link
Contributor

This PR fixes a bug where multiple fixtures of the same class with different variables causes the following error:

pipeline error: fixture 'foo' has more than one instances

Local testing looks regression free; I've also added an additional test case for the bug.

Fixes #3285.

@pep8speaks
Copy link

pep8speaks commented Nov 26, 2024

Hello @tom91136, Thank you for updating!

Cheers! There are no PEP8 issues in this Pull Request!Do see the ReFrame Coding Style Guide

Comment last updated at 2024-12-05 19:55:42 UTC

@tom91136
Copy link
Contributor Author

CI looks good from what I can see

Copy link
Contributor

@vkarak vkarak left a comment

Choose a reason for hiding this comment

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

Thanks for the fix, it's correct. I've simplified the unit tests by moving your test case to unittests/resources/checks_unlisted/fixtures_complex.py which is already run by the unit tests for verifying the fixture resolution.

I've also rebased your PR on master.

@vkarak vkarak changed the title [bugfix] Fix error when more than one instance of the same fixture class are specified [bugfix] Fix error in fixture resolution when multiple fixtures of the same class are instantiated with different variables Dec 5, 2024
@vkarak vkarak enabled auto-merge December 5, 2024 20:05
@vkarak vkarak merged commit 78e50c0 into reframe-hpc:master Dec 5, 2024
38 checks passed
@tom91136
Copy link
Contributor Author

tom91136 commented Dec 5, 2024

Amazing, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Fixture fails when more than one instance of the same class are specified
3 participants