From b9020cfaf6ab2a7754b8bf1964ef897b86c49757 Mon Sep 17 00:00:00 2001 From: sgoodm Date: Tue, 21 Mar 2017 15:53:14 -0400 Subject: [PATCH] Add import for tests and expand cli test --- tests/test_cli.py | 3 ++- tests/test_zonal.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_cli.py b/tests/test_cli.py index d323eba..b6834aa 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -34,7 +34,7 @@ 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 @@ -42,6 +42,7 @@ def test_cli_feature_stdin(): 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(): diff --git a/tests/test_zonal.py b/tests/test_zonal.py index 042f409..11976cd 100644 --- a/tests/test_zonal.py +++ b/tests/test_zonal.py @@ -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__)))