tenkan/tests/config_test.py

15 lines
347 B
Python
Raw Permalink Normal View History

2022-01-12 21:31:56 +01:00
# -*- 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