-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix existing unit test, add new tests
- Loading branch information
1 parent
2612c39
commit c750cb2
Showing
13 changed files
with
852 additions
and
13 deletions.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
python/plugins/processing/tests/testdata/expected/stats_by_cat_date.gfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>stats_by_cat_date</Name> | ||
<ElementPath>stats_by_cat_date</ElementPath> | ||
<GeometryType>100</GeometryType> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>4</FeatureCount> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>date</Name> | ||
<ElementPath>date</ElementPath> | ||
<Type>String</Type> | ||
<Width>10</Width> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>count</Name> | ||
<ElementPath>count</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>unique</Name> | ||
<ElementPath>unique</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>empty</Name> | ||
<ElementPath>empty</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>filled</Name> | ||
<ElementPath>filled</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>min</Name> | ||
<ElementPath>min</ElementPath> | ||
<Type>String</Type> | ||
<Width>10</Width> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>max</Name> | ||
<ElementPath>max</ElementPath> | ||
<Type>String</Type> | ||
<Width>10</Width> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
50 changes: 50 additions & 0 deletions
50
python/plugins/processing/tests/testdata/expected/stats_by_cat_date.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy><gml:null>missing</gml:null></gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:stats_by_cat_date fid="stats_by_cat_date.0"> | ||
<ogr:date>2016/11/30</ogr:date> | ||
<ogr:count>1</ogr:count> | ||
<ogr:unique>1</ogr:unique> | ||
<ogr:empty>0</ogr:empty> | ||
<ogr:filled>1</ogr:filled> | ||
<ogr:min>2016/11/30</ogr:min> | ||
<ogr:max>2016/11/30</ogr:max> | ||
</ogr:stats_by_cat_date> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_date fid="stats_by_cat_date.1"> | ||
<ogr:date>2016/11/10</ogr:date> | ||
<ogr:count>1</ogr:count> | ||
<ogr:unique>1</ogr:unique> | ||
<ogr:empty>0</ogr:empty> | ||
<ogr:filled>1</ogr:filled> | ||
<ogr:min>2016/11/10</ogr:min> | ||
<ogr:max>2016/11/10</ogr:max> | ||
</ogr:stats_by_cat_date> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_date fid="stats_by_cat_date.2"> | ||
<ogr:count>1</ogr:count> | ||
<ogr:unique>0</ogr:unique> | ||
<ogr:empty>1</ogr:empty> | ||
<ogr:filled>0</ogr:filled> | ||
</ogr:stats_by_cat_date> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_date fid="stats_by_cat_date.3"> | ||
<ogr:date>2014/11/30</ogr:date> | ||
<ogr:count>1</ogr:count> | ||
<ogr:unique>1</ogr:unique> | ||
<ogr:empty>0</ogr:empty> | ||
<ogr:filled>1</ogr:filled> | ||
<ogr:min>2014/11/30</ogr:min> | ||
<ogr:max>2014/11/30</ogr:max> | ||
</ogr:stats_by_cat_date> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
86 changes: 86 additions & 0 deletions
86
python/plugins/processing/tests/testdata/expected/stats_by_cat_float.gfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>stats_by_cat_float</Name> | ||
<ElementPath>stats_by_cat_float</ElementPath> | ||
<GeometryType>100</GeometryType> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>5</FeatureCount> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>name</Name> | ||
<ElementPath>name</ElementPath> | ||
<Type>String</Type> | ||
<Width>2</Width> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>count</Name> | ||
<ElementPath>count</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>unique</Name> | ||
<ElementPath>unique</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>min</Name> | ||
<ElementPath>min</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>max</Name> | ||
<ElementPath>max</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>range</Name> | ||
<ElementPath>range</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>sum</Name> | ||
<ElementPath>sum</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>mean</Name> | ||
<ElementPath>mean</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>median</Name> | ||
<ElementPath>median</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>stddev</Name> | ||
<ElementPath>stddev</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>minority</Name> | ||
<ElementPath>minority</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>majority</Name> | ||
<ElementPath>majority</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>q1</Name> | ||
<ElementPath>q1</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>q3</Name> | ||
<ElementPath>q3</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>iqr</Name> | ||
<ElementPath>iqr</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
103 changes: 103 additions & 0 deletions
103
python/plugins/processing/tests/testdata/expected/stats_by_cat_float.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy><gml:null>missing</gml:null></gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:stats_by_cat_float fid="stats_by_cat_float.0"> | ||
<ogr:name>aa</ogr:name> | ||
<ogr:count>2</ogr:count> | ||
<ogr:unique>2</ogr:unique> | ||
<ogr:min>3.33</ogr:min> | ||
<ogr:max>44.123456</ogr:max> | ||
<ogr:range>40.793456</ogr:range> | ||
<ogr:sum>47.453456</ogr:sum> | ||
<ogr:mean>23.726728</ogr:mean> | ||
<ogr:median>23.726728</ogr:median> | ||
<ogr:stddev>20.396728</ogr:stddev> | ||
<ogr:minority>3.33</ogr:minority> | ||
<ogr:majority>3.33</ogr:majority> | ||
<ogr:q1>3.33</ogr:q1> | ||
<ogr:q3>44.123456</ogr:q3> | ||
<ogr:iqr>40.793456</ogr:iqr> | ||
</ogr:stats_by_cat_float> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_float fid="stats_by_cat_float.1"> | ||
<ogr:name>dd</ogr:name> | ||
<ogr:count>1</ogr:count> | ||
<ogr:unique>1</ogr:unique> | ||
<ogr:min>0</ogr:min> | ||
<ogr:max>0</ogr:max> | ||
<ogr:range>0</ogr:range> | ||
<ogr:sum>0</ogr:sum> | ||
<ogr:mean>0</ogr:mean> | ||
<ogr:median>0</ogr:median> | ||
<ogr:stddev>0</ogr:stddev> | ||
<ogr:minority>0</ogr:minority> | ||
<ogr:majority>0</ogr:majority> | ||
<ogr:q1>0</ogr:q1> | ||
<ogr:q3>0</ogr:q3> | ||
<ogr:iqr>0</ogr:iqr> | ||
</ogr:stats_by_cat_float> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_float fid="stats_by_cat_float.2"> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:count>4</ogr:count> | ||
<ogr:unique>1</ogr:unique> | ||
<ogr:min>0.123</ogr:min> | ||
<ogr:max>0.123</ogr:max> | ||
<ogr:range>0</ogr:range> | ||
<ogr:sum>0.492</ogr:sum> | ||
<ogr:mean>0.123</ogr:mean> | ||
<ogr:median>0.123</ogr:median> | ||
<ogr:stddev>0</ogr:stddev> | ||
<ogr:minority>0.123</ogr:minority> | ||
<ogr:majority>0.123</ogr:majority> | ||
<ogr:q1>0.123</ogr:q1> | ||
<ogr:q3>0.123</ogr:q3> | ||
<ogr:iqr>0</ogr:iqr> | ||
</ogr:stats_by_cat_float> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_float fid="stats_by_cat_float.3"> | ||
<ogr:count>1</ogr:count> | ||
<ogr:unique>1</ogr:unique> | ||
<ogr:min>-100291.43213</ogr:min> | ||
<ogr:max>-100291.43213</ogr:max> | ||
<ogr:range>0</ogr:range> | ||
<ogr:sum>-100291.43213</ogr:sum> | ||
<ogr:mean>-100291.43213</ogr:mean> | ||
<ogr:median>-100291.43213</ogr:median> | ||
<ogr:stddev>0</ogr:stddev> | ||
<ogr:minority>-100291.43213</ogr:minority> | ||
<ogr:majority>-100291.43213</ogr:majority> | ||
<ogr:q1>-100291.43213</ogr:q1> | ||
<ogr:q3>-100291.43213</ogr:q3> | ||
<ogr:iqr>0</ogr:iqr> | ||
</ogr:stats_by_cat_float> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_float fid="stats_by_cat_float.4"> | ||
<ogr:name>cc</ogr:name> | ||
<ogr:count>1</ogr:count> | ||
<ogr:unique>1</ogr:unique> | ||
<ogr:min>0.123</ogr:min> | ||
<ogr:max>0.123</ogr:max> | ||
<ogr:range>0</ogr:range> | ||
<ogr:sum>0.123</ogr:sum> | ||
<ogr:mean>0.123</ogr:mean> | ||
<ogr:median>0.123</ogr:median> | ||
<ogr:stddev>0</ogr:stddev> | ||
<ogr:minority>0.123</ogr:minority> | ||
<ogr:majority>0.123</ogr:majority> | ||
<ogr:q1>0.123</ogr:q1> | ||
<ogr:q3>0.123</ogr:q3> | ||
<ogr:iqr>0</ogr:iqr> | ||
</ogr:stats_by_cat_float> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
26 changes: 26 additions & 0 deletions
26
python/plugins/processing/tests/testdata/expected/stats_by_cat_no_value.gfs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>stats_by_cat_no_value</Name> | ||
<ElementPath>stats_by_cat_no_value</ElementPath> | ||
<GeometryType>100</GeometryType> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>6</FeatureCount> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>intval</Name> | ||
<ElementPath>intval</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>name</Name> | ||
<ElementPath>name</ElementPath> | ||
<Type>String</Type> | ||
<Width>2</Width> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>count</Name> | ||
<ElementPath>count</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
48 changes: 48 additions & 0 deletions
48
python/plugins/processing/tests/testdata/expected/stats_by_cat_no_value.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy><gml:null>missing</gml:null></gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:stats_by_cat_no_value fid="stats_by_cat_no_value.0"> | ||
<ogr:intval>1</ogr:intval> | ||
<ogr:name>aa</ogr:name> | ||
<ogr:count>2</ogr:count> | ||
</ogr:stats_by_cat_no_value> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_no_value fid="stats_by_cat_no_value.1"> | ||
<ogr:name>dd</ogr:name> | ||
<ogr:count>2</ogr:count> | ||
</ogr:stats_by_cat_no_value> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_no_value fid="stats_by_cat_no_value.2"> | ||
<ogr:intval>1</ogr:intval> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:count>3</ogr:count> | ||
</ogr:stats_by_cat_no_value> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_no_value fid="stats_by_cat_no_value.3"> | ||
<ogr:intval>120</ogr:intval> | ||
<ogr:count>1</ogr:count> | ||
</ogr:stats_by_cat_no_value> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_no_value fid="stats_by_cat_no_value.4"> | ||
<ogr:name>cc</ogr:name> | ||
<ogr:count>1</ogr:count> | ||
</ogr:stats_by_cat_no_value> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_cat_no_value fid="stats_by_cat_no_value.5"> | ||
<ogr:intval>2</ogr:intval> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:count>1</ogr:count> | ||
</ogr:stats_by_cat_no_value> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
Oops, something went wrong.