Opened 6 years ago

Last modified 5 years ago

#3822 new defect

Tests for r.basins.fill are broken

Reported by: pmav99 Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Tests Version: svn-trunk
Keywords: Cc:
CPU: Unspecified Platform: Unspecified

Description

These tests are broken both for python 2 and python 3:

Moreover, the testsuite overwrites the "elevation" and "geology" maps thus ruining the test dataset (at least on python 3):

before running the tests:

./exec_grass.sh r.univar elevation
Starting GRASS GIS...
Cleaning up temporary files...
Executing <r.univar elevation> ...
 100%
total null and non-null cells: 29535
total null cells: 0

Of the non-null cells:
----------------------
n: 29535
minimum: 89.6269
maximum: 134.301
range: 44.6739
mean: 116.855
mean of absolute values: 116.855
standard deviation: 9.32828
variance: 87.0169
variation coefficient: 7.98278 %
sum: 3451315.7405014
Execution of <r.univar elevation> finished.
Cleaning up default sqlite database ...
Cleaning up temporary files...

after:

./exec_grass.sh r.univar elevation
Starting GRASS GIS...
Cleaning up temporary files...
Executing <r.univar elevation> ...
 100%
total null and non-null cells: 29535
total null cells: 29535

Of the non-null cells:
----------------------
n: 0
minimum: -nan
maximum: -nan
range: -nan
mean: -nan
mean of absolute values: -nan
standard deviation: -nan
variance: -nan
variation coefficient: -nan %
sum: -nan
Execution of <r.univar elevation> finished.
Cleaning up default sqlite database ...
Cleaning up temporary files...

Until someone finds the time to fix them, please add the following decorator on the Test class:

import unittest

@unittest.skip("See #3822")
class TestRasterbasin(TestCase):
    # ...

Attachments (1)

testrbf_fix_mapnames.diff (1.2 KB ) - added by neteler 6 years ago.
Update map names to those used in nc_spm_full_v2alpha

Download all attachments as: .zip

Change History (8)

by neteler, 6 years ago

Attachment: testrbf_fix_mapnames.diff added

Update map names to those used in nc_spm_full_v2alpha

comment:1 by neteler, 6 years ago

After renaming the maps (see attached patch) the test passes here.

in reply to:  1 ; comment:2 by mmetz, 6 years ago

Replying to neteler:

After renaming the maps (see attached patch) the test passes here.

Does it make sense to adjust tests to a test location that is 1) not available, 2) in alpha state?

Last edited 6 years ago by mmetz (previous) (diff)

in reply to:  2 comment:3 by neteler, 6 years ago

Replying to mmetz:

Replying to neteler:

After renaming the maps (see attached patch) the test passes here.

Does it make sense to adjust tests to a test location that is 1) not available,

It is available: http://fatra.cnr.ncsu.edu/data/

2) in alpha state?

In the end I only restored the names of the standard sample data set and found that the tests works.

comment:4 by pmav99, 6 years ago

After applying the patch, the tests do pass, but the "elevation" map still gets corrupted.

comment:5 by sbl, 6 years ago

In 74423:

deactivate erroneous test; see #3822

comment:6 by sbl, 6 years ago

The test actually only tests if the module works, but contains additinal tests that have nothing to to with the module in question (and rather tests data or other modules). Took the liberty to deactivate the test until fixed with proper test cases.

comment:7 by neteler, 5 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.