Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@cligj.use_rs_opt
def cmd(sequence, use_rs):
click.echo("%s" % sequence)
click.echo("%s" % use_rs)
@cligj.indent_opt
def cmd(indent):
click.echo("%s" % indent)
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)
def test_featuresequence(expected_features):
features = normalize_feature_inputs(
None, 'features', ["tests/twopoints_seq.txt"])
assert _geoms(features) == _geoms(expected_features)
def test_featurecollection_pretty_file(expected_features):
features = normalize_feature_inputs(
None, 'features', ["tests/twopoints-pretty.json"])
assert _geoms(features) == _geoms(expected_features)
def test_featurecollection_file(expected_features):
features = normalize_feature_inputs(
None, 'features', ["tests/twopoints.geojson"])
assert _geoms(features) == _geoms(expected_features)
def test_singlefeature(expected_features):
features = normalize_feature_inputs(
None, 'features', ["tests/onepoint.geojson"])
assert _geoms(features) == _geoms([expected_features[0]])
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)
def test_featuresequencers(expected_features):
features = normalize_feature_inputs(
None, 'features', ["tests/twopoints_seqrs.txt"])
assert _geoms(features) == _geoms(expected_features)
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)