Skip to content

Commit

Permalink
Add import for tests and expand cli test
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoodm committed Mar 21, 2017
1 parent 5ffce1a commit b9020cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ def test_cli_feature_stdin():
warnings.simplefilter('ignore')
result = runner.invoke(zonalstats,
['--raster', raster,
'--stats', 'mean',
'--stats', 'all',
'--prefix', 'test_'],
input=open(vector, 'r').read())
assert result.exit_code == 0
outdata = json.loads(result.output)
assert len(outdata['features']) == 1
feature = outdata['features'][0]
assert 'test_mean' in feature['properties']
assert 'test_std' in feature['properties']


def test_cli_features_sequence():
Expand Down
1 change: 1 addition & 0 deletions tests/test_zonal.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from rasterstats.utils import VALID_STATS
from rasterstats.io import read_featurecollection, read_features
from shapely.geometry import Polygon
from affine import Affine

sys.path.append(os.path.dirname(os.path.abspath(__file__)))

Expand Down

0 comments on commit b9020cf

Please sign in to comment.