Exemple #1
0
def test_charm_parameters_requirement(config):
    """The --requirement option implies a set of validations."""
    cmd = PackCommand("group", config)
    parser = ArgumentParser()
    cmd.fill_parser(parser)
    (action,) = [action for action in parser._actions if action.dest == "requirement"]
    assert action.type is useful_filepath
Exemple #2
0
def test_charm_parameters_entrypoint(config):
    """The --entrypoint option implies a set of validations."""
    cmd = PackCommand("group", config)
    parser = ArgumentParser()
    cmd.fill_parser(parser)
    (action,) = [action for action in parser._actions if action.dest == "entrypoint"]
    assert isinstance(action.type, SingleOptionEnsurer)
    assert action.type.converter is useful_filepath