[GRASS-SVN] r68177 - grass/trunk/lib/python/temporal
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 28 23:11:18 PDT 2016
Author: zarch
Date: 2016-03-28 23:11:18 -0700 (Mon, 28 Mar 2016)
New Revision: 68177
Modified:
grass/trunk/lib/python/temporal/temporal_operator.py
Log:
temporal python library: fix doctest to return a tuple
Modified: grass/trunk/lib/python/temporal/temporal_operator.py
===================================================================
--- grass/trunk/lib/python/temporal/temporal_operator.py 2016-03-29 02:43:55 UTC (rev 68176)
+++ grass/trunk/lib/python/temporal/temporal_operator.py 2016-03-29 06:11:18 UTC (rev 68177)
@@ -14,92 +14,92 @@
>>> p = TemporalOperatorParser()
>>> expression = "{equal| during}"
>>> p.parse(expression, optype = 'relation')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['equal', 'during'], None, None)
>>> p = TemporalOperatorParser()
>>> expression = "{contains | starts}"
>>> p.parse(expression)
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['contains', 'starts'], None, None)
>>> p = TemporalOperatorParser()
>>> expression = "{&&, during}"
>>> p.parse(expression, optype = 'boolean')
- >>> print(p.relations, p.temporal, p.function,p.aggregate)
+ >>> print((p.relations, p.temporal, p.function,p.aggregate))
(['during'], 'l', '&&', '&')
>>> p = TemporalOperatorParser()
>>> expression = "{||, equal | during}"
>>> p.parse(expression, optype = 'boolean')
- >>> print(p.relations, p.temporal, p.function,p.aggregate)
+ >>> print((p.relations, p.temporal, p.function,p.aggregate))
(['equal', 'during'], 'l', '||', '|')
>>> p = TemporalOperatorParser()
>>> expression = "{||, equal | during, &}"
>>> p.parse(expression, optype = 'boolean')
- >>> print(p.relations, p.temporal, p.function,p.aggregate)
+ >>> print((p.relations, p.temporal, p.function,p.aggregate))
(['equal', 'during'], 'l', '||', '&')
>>> p = TemporalOperatorParser()
>>> expression = "{&&, during, |}"
>>> p.parse(expression, optype = 'boolean')
- >>> print(p.relations, p.temporal, p.function,p.aggregate)
+ >>> print((p.relations, p.temporal, p.function,p.aggregate))
(['during'], 'l', '&&', '|')
>>> p = TemporalOperatorParser()
>>> expression = "{&&, during, |, r}"
>>> p.parse(expression, optype = 'boolean')
- >>> print(p.relations, p.temporal, p.function,p.aggregate)
+ >>> print((p.relations, p.temporal, p.function,p.aggregate))
(['during'], 'r', '&&', '|')
>>> p = TemporalOperatorParser()
>>> expression = "{&&, during, u}"
>>> p.parse(expression, optype = 'boolean')
- >>> print(p.relations, p.temporal, p.function,p.aggregate)
+ >>> print((p.relations, p.temporal, p.function,p.aggregate))
(['during'], 'u', '&&', '&')
>>> p = TemporalOperatorParser()
>>> expression = "{:, during, r}"
>>> p.parse(expression, optype = 'select')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['during'], 'r', ':')
>>> p = TemporalOperatorParser()
>>> expression = "{!:, equal | contains, d}"
>>> p.parse(expression, optype = 'select')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['equal', 'contains'], 'd', '!:')
>>> p = TemporalOperatorParser()
>>> expression = "{#, during, r}"
>>> p.parse(expression, optype = 'hash')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['during'], 'r', '#')
>>> p = TemporalOperatorParser()
>>> expression = "{#, equal | contains}"
>>> p.parse(expression, optype = 'hash')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['equal', 'contains'], 'l', '#')
>>> p = TemporalOperatorParser()
>>> expression = "{+, during, r}"
>>> p.parse(expression, optype = 'raster')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['during'], 'r', '+')
>>> p = TemporalOperatorParser()
>>> expression = "{/, equal | contains}"
>>> p.parse(expression, optype = 'raster')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['equal', 'contains'], 'l', '/')
>>> p = TemporalOperatorParser()
>>> expression = "{+, equal | contains,intersect}"
>>> p.parse(expression, optype = 'raster')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['equal', 'contains'], 'i', '+')
>>> p = TemporalOperatorParser()
>>> expression = "{*, contains,disjoint}"
>>> p.parse(expression, optype = 'raster')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['contains'], 'd', '*')
>>> p = TemporalOperatorParser()
>>> expression = "{~, equal,left}"
>>> p.parse(expression, optype = 'overlay')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['equal'], 'l', '~')
>>> p = TemporalOperatorParser()
>>> expression = "{^, over,right}"
>>> p.parse(expression, optype = 'overlay')
- >>> print(p.relations, p.temporal, p.function)
+ >>> print((p.relations, p.temporal, p.function))
(['overlaps', 'overlapped'], 'r', '^')
"""
@@ -613,4 +613,3 @@
if __name__ == "__main__":
import doctest
doctest.testmod()
-
More information about the grass-commit
mailing list