Exemplo n.º 1
0
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
Exemplo n.º 2
0
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 == ""
Exemplo n.º 3
0
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