[thuban-Patches][688] Bugfixes for umn_mapserver extension

thuban-patches@wald.intevation.org thuban-patches at wald.intevation.org
Sat Jul 19 23:43:10 CEST 2008


Patches item #688, was opened at 2008-07-19 18:43
Status: Open
Priority: 3
Submitted By: Anthony Lenton (elachuni)
Assigned to: Nobody (None)
Summary: Bugfixes for umn_mapserver extension 
Version: None
Category: None


Initial Comment:
Hello, I'm using mapscript 5.0.0 here and I get the following failures when I run the umn_mapserver extension tests:

anthony at daphne:~/svn/thuban/trunk/thuban/Extensions/umn_mapserver/test$ python test_mapserver.py 
..F...FE........
======================================================================
ERROR: test_MF_Scalebar (__main__.mapserver_Classes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_mapserver.py", line 234, in test_MF_Scalebar
    self.eq(testscalebar.get_position(mode="string"),"ll")
  File "/home/anthony/svn/thuban/trunk/thuban/Extensions/umn_mapserver/mapfile.py", line 786, in get_position
    return scalebar_position_type[self._scalebar.position]
KeyError: 104

======================================================================
FAIL: test_MF_Layer (__main__.mapserver_Classes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_mapserver.py", line 198, in test_MF_Layer
    self.eq(testlayer.get_projection().get_projection(), "+proj=latlong+ellps=clrk66")
AssertionError: '+proj=latlong +ellps=clrk66' != '+proj=latlong+ellps=clrk66'

======================================================================
FAIL: test_MF_Projection (__main__.mapserver_Classes)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test_mapserver.py", line 278, in test_MF_Projection
    self.eq(testproj.get_params(), ['proj=utm','ellps=WGS84','zone=26','north'])
AssertionError: ['proj=utm ', 'ellps=WGS84 ', 'zone=26 ', 'north'] != ['proj=utm', 'ellps=WGS84', 'zone=26', 'north']

----------------------------------------------------------------------
Ran 16 tests in 0.023s

FAILED (failures=2, errors=1)
anthony at daphne:~/svn/thuban/trunk/thuban/Extensions/umn_mapserver/test$ 

The attached patch fixes the failing tests.

I have the feeling that several of the enumerations at the beginning of mapfile.py should be changed to use the MS_* constants instead of assuming that enumerations start from 0, label_position_type and legend_position_type at least; at the moment there isn't a test that fails for those, but I think that's because of missing tests, not because of working code.



----------------------------------------------------------------------

You can respond by visiting: 
http://wald.intevation.org/tracker/?func=detail&atid=107&aid=688&group_id=6




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)