test: use shared config fixture
This commit is contained in:
@@ -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"):
|
||||
|
||||
Reference in New Issue
Block a user