chore: import upstream snapshot with attribution
CodeQL / Analyze (python) (push) Has been cancelled
Update Platform Components Table / update (push) Has been cancelled
Docker image release / Build base image (push) Has been cancelled
Sync docs with Docusaurus / sync (push) Has been cancelled
Tests / Check if changed (push) Has been cancelled
Tests / format (push) Has been cancelled
Tests / check-imports (push) Has been cancelled
Tests / Unit / macos-latest (push) Has been cancelled
Tests / Unit / ubuntu-latest (push) Has been cancelled
Tests / Unit / windows-latest (push) Has been cancelled
Tests / mypy (push) Has been cancelled
Tests / Integration / ubuntu-latest (push) Has been cancelled
Tests / Integration / macos-latest (push) Has been cancelled
Tests / Integration / windows-latest (push) Has been cancelled
Tests / notify-slack-on-failure (push) Has been cancelled
Tests / Mark tests as completed (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Update Platform Components Table / update (push) Has been cancelled
Docker image release / Build base image (push) Has been cancelled
Sync docs with Docusaurus / sync (push) Has been cancelled
Tests / Check if changed (push) Has been cancelled
Tests / format (push) Has been cancelled
Tests / check-imports (push) Has been cancelled
Tests / Unit / macos-latest (push) Has been cancelled
Tests / Unit / ubuntu-latest (push) Has been cancelled
Tests / Unit / windows-latest (push) Has been cancelled
Tests / mypy (push) Has been cancelled
Tests / Integration / ubuntu-latest (push) Has been cancelled
Tests / Integration / macos-latest (push) Has been cancelled
Tests / Integration / windows-latest (push) Has been cancelled
Tests / notify-slack-on-failure (push) Has been cancelled
Tests / Mark tests as completed (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# SPDX-FileCopyrightText: 2022-present deepset GmbH <info@deepset.ai>
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
from haystack.testing.test_utils import set_all_seeds
|
||||
|
||||
set_all_seeds(0)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def samples_path():
|
||||
return Path(__file__).parent / "samples"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def del_hf_env_vars(monkeypatch):
|
||||
"""
|
||||
Delete Hugging Face environment variables for tests.
|
||||
|
||||
Prevents passing empty tokens to Hugging Face, which would cause API calls to fail.
|
||||
This is particularly relevant for PRs opened from forks, where secrets are not available
|
||||
and empty environment variables might be set instead of being removed.
|
||||
|
||||
See https://github.com/deepset-ai/haystack/issues/8811 for more details.
|
||||
"""
|
||||
monkeypatch.delenv("HF_API_TOKEN", raising=False)
|
||||
monkeypatch.delenv("HF_TOKEN", raising=False)
|
||||
Reference in New Issue
Block a user