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
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions tests/test_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
fixtures are tested in test_database.
"""

import os
import socket
from collections.abc import Generator
from contextlib import contextmanager
Expand Down Expand Up @@ -443,6 +444,7 @@ def test_set_non_existent(settings):


class TestLiveServer:
@pytest.mark.skipif("PYTEST_XDIST_WORKER" in os.environ, reason="xdist in use")
def test_settings_before(self) -> None:
from django.conf import settings

Expand All @@ -458,6 +460,7 @@ def test_url(self, live_server) -> None:
def test_change_settings(self, live_server, settings) -> None:
assert live_server.url == force_str(live_server)

@pytest.mark.skipif("PYTEST_XDIST_WORKER" in os.environ, reason="xdist in use")
def test_settings_restored(self) -> None:
"""Ensure that settings are restored after test_settings_before."""
from django.conf import settings
Expand Down