예제 #1
0
def test_options_format_possible_values(config):
    """The format option implies a set of validations."""
    cmd = AnalyzeCommand(config)
    parser = ArgumentParser()
    cmd.fill_parser(parser)
    (action, ) = [
        action for action in parser._actions if action.dest == "format"
    ]
    assert action.choices == ["json"]
예제 #2
0
def test_options_filepath_type(config):
    """The filepath parameter implies a set of validations."""
    cmd = AnalyzeCommand(config)
    parser = ArgumentParser()
    cmd.fill_parser(parser)
    (action, ) = [
        action for action in parser._actions if action.dest == "filepath"
    ]
    assert action.type is useful_filepath