tenkan/tests/config_test.py
2022-01-12 22:00:37 +01:00

14 lines
347 B
Python

# -*- coding: utf-8 -*-
from pathlib import Path
import pytest
from tenkan.config import load_config
def test_configfile_missing():
config = Path('/tmp/toto.conf')
with pytest.raises(SystemExit) as pytest_wrapped_e:
load_config(config)
assert pytest_wrapped_e.type == SystemExit
assert pytest_wrapped_e.value.code == 1