diff --git a/tests/conftest.py.orig b/tests/conftest.py index 77f9c0cb71d..43d2a1e8227 100644 --- a/tests/conftest.py.orig +++ b/tests/conftest.py @@ -470,38 +470,6 @@ def user_with_phone(user, phone): get_adapter().set_phone(user, phone, True) return user - -def pytest_ignore_collect(path, config): - from tests.projects.common.settings import INSTALLED_SOCIALACCOUNT_APPS - - if "allauth.socialaccount.providers.saml" not in INSTALLED_SOCIALACCOUNT_APPS: - if ( - Path(__file__).parent / "apps" / "socialaccount" / "providers" / "saml" - in Path(path).parents - ): - return True - - tests_to_skip = { - "tests.projects.account_only.settings": ( - "headless", - "mfa", - "usersessions", - "socialaccount", - "idp", - ), - "tests.projects.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 / "apps" / 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.projects.common import adapters