コード例 #1
0
ファイル: test_konfik.py プロジェクト: rednafi/konfik
def test_konfik_cli_path(capsys):
    """Test the CLI help message."""

    cli_entrypoint(argv=["--path=examples/config.toml"])
    capture = capsys.readouterr()
    assert capture.err == ""
    assert "Konfik -- The strangely familiar config parser ⚙️" in capture.out
コード例 #2
0
ファイル: test_konfik.py プロジェクト: rednafi/konfik
def test_konfik_cli_version(capsys):
    """Test the CLI version."""

    cli_entrypoint(argv=["--version"])
    capture = capsys.readouterr()
    assert __version__ in capture.out
    assert capture.err == ""
コード例 #3
0
ファイル: test_konfik.py プロジェクト: rednafi/konfik
def test_konfik_cli_show_var(capsys):
    """Test the CLI help message."""

    cli_entrypoint(argv=["--path=examples/config.toml", "--var=owner.dob"])
    capture = capsys.readouterr()
    assert capture.err == ""
    assert "Konfik -- The strangely familiar config parser ⚙️" in capture.out
    assert "tzinfo=<toml.tz.TomlTz" in capture.out