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

Add empty sentinel item in WorkerInteractor queue #1090

Closed
wants to merge 1 commit into from

Conversation

yuvalino
Copy link

@yuvalino yuvalino commented May 31, 2024

When pytest_runtest_protocol is called with item==nextitem multiple times, with a test that accepts some fixtures -> the second call forward raises an error.

This is caused in WorkerInteractor when the same test appears twice in a row in the queue.

To deal with this, we define an "empty" item that shall allow us to call pytest_runtest_protocol with nextitem=None, effectively solving this problem so long sequential executions of the same items are delimited by these empty items in the queue.

When pytest_runtest_protocol is called with item==nextitem multiple times, with a test that accepts some fixtures -> the second call forward raises an error.

This is causes in WorkerInteractor when the same test appears twice in a row in its items queue.

To deal with this, we define an "empty" item that shall allow us to call pytest_runtest_protocol with nextitem=None, effectively solving this problem so long sequential executions of the same items are delimited by these empty items in the queue.
@yuvalino yuvalino closed this May 31, 2024
@yuvalino
Copy link
Author

Much better solution has been proposed in #1091

@yuvalino yuvalino deleted the patch-1 branch May 31, 2024 20:31
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.

1 participant