[GRASS-dev] [GRASS GIS] #2875: Python testsuite failing with UnicodeDecodeError
GRASS GIS
trac at osgeo.org
Mon Jan 25 05:36:43 PST 2016
#2875: Python testsuite failing with UnicodeDecodeError
--------------------------+-------------------------
Reporter: marisn | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.1.0
Component: Tests | Version: svn-trunk
Resolution: | Keywords:
CPU: Unspecified | Platform: Linux
--------------------------+-------------------------
Comment (by mlennert):
Replying to [ticket:2875 marisn]:
> Unfortunately it is not possible to run tests as test suite is failing
itself (has anyone written tests for test suite?):
>
> {{{
> ERROR: test_seed_required (__main__.TestRandFunction)
> Test that seed is required when rand() is used
> ----------------------------------------------------------------------
> Traceback (most recent call last):
> File "raster/r.mapcalc/testsuite/test_r_mapcalc.py", line 99, in
test_seed_required
> self.assertModuleFail('r.mapcalc', expression='rand_x = rand(1,
200)')
> File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/gunittest/case.py", line 1180, in assertModuleFail
> module.run()
> File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/pygrass/modules/interface/module.py", line 713, in
run
> module=self.name, errors=stderr)
> File "/home/maris/soft/grass_trunk/dist.x86_64-pc-linux-
gnu/etc/python/grass/exceptions/__init__.py", line 71, in __init__
> msg += _(". See the following errors:\n%s") % errors
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xc4 in position 29:
ordinal not in range(128)
> }}}
>
> The largest question is - should there be strings for translation at
all? I think not as most of low level errors and debug information is not
marked for translation. Tests should be run by developers not end users
thus I don't see a point in translating such strings.
Generally +1, but maybe a few tests specifically on encoding might help
finding encoding errors automatically. Although most encoding issues are
GUI-related and I don't know if it is possible to test that ?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2875#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list