コード例 #1
0
ファイル: test_config.py プロジェクト: gc-ss/ward
def _(tmp=temp_config_invalid):
    with raises(click.FileError):
        read_config_toml(Path(tempfile.gettempdir()), tmp.name)
コード例 #2
0
ファイル: test_config.py プロジェクト: gc-ss/ward
def _(tmp=temp_config_file_hyphens):
    conf = read_config_toml(Path(tempfile.gettempdir()), tmp.name)
    assert "some_key" in conf
    assert conf["some_key"] == "some-value"
コード例 #3
0
ファイル: test_config.py プロジェクト: gc-ss/ward
def _(tmp=temp_config_missing):
    conf = read_config_toml(Path(tempfile.gettempdir()), tmp.name)
    assert conf == {}
コード例 #4
0
ファイル: test_config.py プロジェクト: gc-ss/ward
def _():
    conf = read_config_toml(Path(tempfile.gettempdir()), "doesnt_exist.toml")
    assert conf == {}
コード例 #5
0
ファイル: test_config.py プロジェクト: gc-ss/ward
def _(tmp=temp_config_file):
    conf = read_config_toml(Path(tempfile.gettempdir()), tmp.name)
    assert "path" in conf
    assert conf["path"] == "test_path"
コード例 #6
0
def _(tmp=temp_config_file):
    conf = read_config_toml(Path(tempfile.gettempdir()), tmp.name)
    assert conf == {"path": "test_path"}