-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
r.stats.quantile: minimalistic testsuite added
Triggers #2259
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
raster/r.stats.quantile/testsuite/test_r_stats_quantile.py
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,36 @@ | ||
from grass.gunittest.case import TestCase | ||
from grass.gunittest.main import test | ||
from grass.gunittest.gmodules import call_module | ||
|
||
# TODO: add verification of r.stats.quantile -p output | ||
|
||
class TestStatsQuantile(TestCase): | ||
|
||
base = "zipcodes" | ||
cover = "elevation" | ||
|
||
def setUp(self): | ||
self.use_temp_region() | ||
call_module("g.region", raster="elevation") | ||
|
||
def tearDown(self): | ||
self.del_temp_region() | ||
call_module( | ||
"g.remove", | ||
flags="f", | ||
type_="raster", | ||
name=[self.base, self.cover], | ||
) | ||
|
||
def test_limits(self): | ||
self.assertModule( | ||
"r.stats.quantile", | ||
base=self.base, | ||
cover=self.cover, | ||
quantiles=3, | ||
flags="p", | ||
) | ||
|
||
|
||
if __name__ == "__main__": | ||
test() |