コード例 #1
0
def test_parse_arguments_verbose() -> None:
    assert update_config.parse_arguments(["-v"]).verbose == 1
    assert update_config.parse_arguments(["-v"] * 2).verbose == 2
    assert update_config.parse_arguments(["-v"] * 3).verbose == 3
コード例 #2
0
def test_parse_arguments_debug() -> None:
    assert update_config.parse_arguments(["--debug"]).debug is True
コード例 #3
0
def test_parse_arguments_defaults() -> None:
    assert update_config.parse_arguments([]).__dict__ == {
        "debug": False,
        "verbose": 0,
    }