diff --git a/allauth/conftest.py.orig b/allauth/conftest.py index 00c2b78d8f2..df7dc57330f 100644 --- a/allauth/conftest.py.orig +++ b/allauth/conftest.py @@ -1,13 +1,11 @@ import importlib import json -import os import random import re import sys import time import uuid from contextlib import contextmanager -from pathlib import Path from unittest.mock import Mock, PropertyMock, patch from django.contrib.auth import get_user_model @@ -470,38 +468,6 @@ def user_with_phone(user, phone): get_adapter().set_phone(user, phone, True) return user - -def pytest_ignore_collect(path, config): - from tests.common.settings import INSTALLED_SOCIALACCOUNT_APPS - - if "allauth.socialaccount.providers.saml" not in INSTALLED_SOCIALACCOUNT_APPS: - if ( - Path(__file__).parent / "socialaccount" / "providers" / "saml" - in Path(path).parents - ): - return True - - tests_to_skip = { - "tests.account_only.settings": ( - "headless", - "mfa", - "usersessions", - "socialaccount", - "idp", - ), - "tests.headless_only.settings": ("idp",), - } - dsm = os.getenv("DJANGO_SETTINGS_MODULE") - skipped_paths = tests_to_skip.get(dsm) - if not skipped_paths: - return False - for skipped_path in skipped_paths: - abs_skipped_path = Path(__file__).parent / skipped_path - if abs_skipped_path == Path(path) or abs_skipped_path in Path(path).parents: - return True - return False - - @pytest.fixture() def messagesoutbox(): from tests.common import adapters