Пример #1
0
def main(argv: list) -> None:
    """The big tent.
    :param list argv: All the args. sys.argv
    """

    params = parse_params(argv[1:])
    survey_range(params)
Пример #2
0
def test_defaults() -> None:
    """ParamParser defaults."""
    params = parse_params()
    assert params.loglevel == logging.ERROR
    assert params.wild_type == pwhich("true")
    assert not params.mutants
    assert not params.cmd_args
    assert not params.bit_range
    assert not params.bit_file
Пример #3
0
def test_range_and_file() -> None:
    """parse_param() understands --bit_range and --bit_file are mutually exclusive.."""
    with pytest.raises(SystemExit):
        parse_params(["--bit_file=/etc/passwd", "--bit_range=1:2"])
Пример #4
0
def test_bit_file() -> None:
    """parse_param() understands --bit_range."""
    params = parse_params(["--bit_file=/etc/passwd"])
    assert params.bit_file == "/etc/passwd"
Пример #5
0
def test_bit_range() -> None:
    """parse_param() understands --bit_range."""
    params = parse_params(["--bit_range=3:5"])
    assert params.bit_range == "3:5"
Пример #6
0
def test_mutants() -> None:
    """parse_param() understands --mutants."""
    params = parse_params(["--mutants=foobarmumble"])
    assert params.mutants == "foobarmumble"
Пример #7
0
def test_wild_type() -> None:
    """parse_param() understands --wild_type."""
    params = parse_params(["--wild_type=/etc/passwd"])
    assert params.wild_type == Path("/etc/passwd")
Пример #8
0
def test_debug() -> None:
    """parse_param() understands --debug."""
    params = parse_params(["--debug"])
    assert params.loglevel == logging.DEBUG
Пример #9
0
def test_verbose() -> None:
    """parse_param() understands --verbose."""
    params = parse_params(["--verbose"])
    assert params.loglevel == logging.INFO