How to use cligj - 10 common examples

To help you get started, we’ve selected a few cligj examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mapbox / cligj / tests / test_cli.py View on Github external
    @cligj.use_rs_opt
    def cmd(sequence, use_rs):
        click.echo("%s" % sequence)
        click.echo("%s" % use_rs)
github mapbox / cligj / tests / test_cli.py View on Github external
    @cligj.indent_opt
    def cmd(indent):
        click.echo("%s" % indent)
github mapbox / cligj / tests / test_features.py View on Github external
def test_featurecollection_stdin(expected_features):
    sys.stdin = open("tests/twopoints.geojson", 'r')
    features = normalize_feature_inputs(None, 'features', [])
    assert _geoms(features) == _geoms(expected_features)
github mapbox / cligj / tests / test_features.py View on Github external
def test_featuresequence(expected_features):
    features = normalize_feature_inputs(
        None, 'features', ["tests/twopoints_seq.txt"])
    assert _geoms(features) == _geoms(expected_features)
github mapbox / cligj / tests / test_features.py View on Github external
def test_featurecollection_pretty_file(expected_features):
    features = normalize_feature_inputs(
        None, 'features', ["tests/twopoints-pretty.json"])
    assert _geoms(features) == _geoms(expected_features)
github mapbox / cligj / tests / test_features.py View on Github external
def test_featurecollection_file(expected_features):
    features = normalize_feature_inputs(
        None, 'features', ["tests/twopoints.geojson"])
    assert _geoms(features) == _geoms(expected_features)
github mapbox / cligj / tests / test_features.py View on Github external
def test_singlefeature(expected_features):
    features = normalize_feature_inputs(
        None, 'features', ["tests/onepoint.geojson"])
    assert _geoms(features) == _geoms([expected_features[0]])
github mapbox / cligj / tests / test_features.py View on Github external
def test_featuresequencers_stdin(expected_features):
    sys.stdin = open("tests/twopoints_seqrs.txt", 'r')
    features = normalize_feature_inputs(None, 'features', [])
    assert _geoms(features) == _geoms(expected_features)
github mapbox / cligj / tests / test_features.py View on Github external
def test_featuresequencers(expected_features):
    features = normalize_feature_inputs(
        None, 'features', ["tests/twopoints_seqrs.txt"])
    assert _geoms(features) == _geoms(expected_features)
github mapbox / cligj / tests / test_features.py View on Github external
def test_featuresequence_stdin(expected_features):
    sys.stdin = open("tests/twopoints_seq.txt", 'r')
    features = normalize_feature_inputs(None, 'features', [])
    assert _geoms(features) == _geoms(expected_features)