Skip to content

Skip test that cannot be ran in parallel #1217

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

kingbuzzman
Copy link
Contributor

@kingbuzzman kingbuzzman commented Jun 5, 2025

There are weird tests in TestLiveServer.test_settings_before/test_settings_restored that requires xdist to not be used. Since they set a global variable, and due to how xdist works, you cannot guarantee the order or the same worker.

@kingbuzzman kingbuzzman marked this pull request as ready for review June 5, 2025 23:08
@kingbuzzman kingbuzzman requested review from bluetech and Copilot June 5, 2025 23:08
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR skips tests that cannot be run in parallel when using xdist by applying a pytest skipif decorator to the affected tests. Key changes include adding an import for the os module and decorating two test methods in TestLiveServer to skip execution when the environment variable "PYTEST_XDIST_WORKER" is present.

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