Opened 6 years ago

Closed 6 years ago

#3774 closed defect (fixed)

lib/gis/testsuite/test_parser_json.py are failing

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

Description

The tests on lib/gis/testsuite/test_parser_json.py are failing both on Python 2 + 3.

- [{'param': 'input', 'value': 'hospitals'},
+ [{'param': 'input', 'value': 'hospitals@PERMANENT'},

The tests are also using simplejson which is 3rd party lib and needs to be installed. I would advise changing that to json. A simple s/simplejson/json/g should do it.

Change History (5)

comment:1 by neteler, 6 years ago

Resolution: fixed
Status: newclosed

In 74162:

test_parser_json.py testsuite: use json instead of simplejson (fixes #3774) (contributed by pmav99)

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

Thanks for catching this.

Replying to pmav99:

- [{'param': 'input', 'value': 'hospitals'},
+ [{'param': 'input', 'value': 'hospitals@PERMANENT'},

... this code I didn't find. Where is that located?

comment:3 by pmav99, 6 years ago

@neteler yes, I am sorry, I should have elaborated a bit more.

That was the output of the tests that show the differences between expected and actual output. The lines that throw the errors are 46 and 74.

I don't feel comfortable suggesting a fix here, because I am not familiar enough with fully qualified map names and their nuances. In other words I can't really judge if the error is in the test itself or in the tested code. But, one way or the other, the test is failing and needs to be fixed.

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

comment:4 by neteler, 6 years ago

Resolution: fixed
Status: closedreopened

comment:5 by sbl, 6 years ago

Resolution: fixed
Status: reopenedclosed

Just ran the test locally:

bin.x86_64-pc-linux-gnu/grass77 -c ./demolocation/stefan --exec python ./lib/gis/testsuite/test_parser_json.py

and it passed without error, both with demolocation and nc_spm_08_grass7.

Closing the ticket, feel free to reopen if needed

Note: See TracTickets for help on using tickets.