test: use shared config fixture

This commit is contained in:
2025-12-30 23:09:01 +01:00
parent 82b99da50d
commit dd3b220a4a
2 changed files with 10 additions and 27 deletions

View File

@@ -1,17 +1,8 @@
from pathlib import Path
from unittest.mock import patch
import pytest
import yaml
from skywipe.configure import Configuration
@pytest.fixture
def config_with_tmp_path(monkeypatch, tmp_path):
monkeypatch.setattr(Path, "home", lambda: tmp_path)
return Configuration()
def test_configuration_load_missing_file(config_with_tmp_path):
with pytest.raises(FileNotFoundError, match="Configuration file not found"):