Great, thanks Tyler.

This issue is because the server does not consistently report the same list of available WMS layers.

Perhaps we should change the test so that it just checks to see if particular layers are available in the list. e.g. if 'global_mosaic_base' is there for example.

Cheers,

Dom



On 10/09/10 22:34, Tyler Erickson wrote:
I'm still getting on doctest error for r1675, so I added a ticket and
attached a fix.  I assume one of you can review the diff file and commit
the change if it passes muster.
http://trac.gispython.org/lab/ticket/231

- Tyler



On Thu, Sep 2, 2010 at 5:12 AM, Dominic Lowe <[email protected]
<mailto:[email protected]>> wrote:

    Okay, I've fixed the rest of the testing errors in r1675.

    Regards
    Dom






    On 01/09/10 17:21, Kralidis,Tom [Ontario] wrote:


        FYI I fixed the CSW testing error in r1674.

        ..Tom


            -----Original Message-----
            From: [email protected]
            <mailto:[email protected]>
            [mailto:[email protected]
            <mailto:[email protected]>] On Behalf Of
            Tyler Erickson
            Sent: Wednesday, 01 September 2010 11:36
            To: gispython.org <http://gispython.org> community projects
            Subject: Re: [Community] OWSLib testing question

            Here is the version info and test results:

            $ svn info
            Path: .
            URL: http://svn.gispython.org/svn/gispy/OWSLib/trunk
            Repository Root: http://svn.gispython.org/svn/gispy
            Repository UUID: b426a367-1105-0410-b9ff-cdf4ab011145
            Revision: 1672
            Node Kind: directory
            Schedule: normal
            Last Changed Author: tomkralidis
            Last Changed Rev: 1671
            Last Changed Date: 2010-07-01 20:45:48 -0600 (Thu, 01 Jul 2010)

            $ python setup.py test
            running test
            running egg_info
            writing OWSLib.egg-info/PKG-INFO
            writing top-level names to OWSLib.egg-info/top_level.txt
            writing dependency_links to OWSLib.egg-info/dependency_links.txt
            unrecognized .svn/entries format in
            reading manifest file 'OWSLib.egg-info/SOURCES.txt'
            writing manifest file 'OWSLib.egg-info/SOURCES.txt'
            running build_ext
            Doctest: wfs_MapServerWFSFeature.txt ...
            /usr/local/OWSLib/trunk/owslib/feature/wfs100.py:60:
            DeprecationWarning: object.__new__() takes no parameters
               obj=object.__new__(self, url, version, xml) ok
            Doctest: csw_gdp.txt ... FAIL
            Doctest: wms_TelaCapabilities.txt ... FAIL
            Doctest: ows_interfaces.txt ...
            /usr/local/OWSLib/trunk/owslib/coverage/wcsBase.py:33:
            DeprecationWarning: object.__new__() takes no parameters
               obj=object.__new__(self, url, xml ,cookies) FAIL
            Doctest: wms_JPLCapabilities.txt ... FAIL
            Doctest: wcs_idee.txt ... ok
            Doctest: wfs_MapServerWFSCapabilities.txt ... ok
            Doctest: wfs2_ndg3betaGrid.txt ...
            /usr/local/OWSLib/trunk/owslib/feature/wfs200.py:53:
            DeprecationWarning: object.__new__() takes no parameters
               obj=object.__new__(self, url, version, xml) building WFS
            http://ndg3beta.badc.rl.ac.uk/cows/demo_hadcm3/wfs?
            building WFS http://ndg3beta.badc.rl.ac.uk/cows/demo_hadcm3/wfs?
            building WFS http://ndg3beta.badc.rl.ac.uk/cows/demo_hadcm3/wfs?
            building WFS http://ndg3beta.badc.rl.ac.uk/cows/demo_hadcm3/wfs?
            ok
            Doctest: wms_GeoServerCapabilities.txt ... FAIL
            Doctest: csw_nlr.txt ... ok
            Doctest: TESTING.txt ... ok
            Doctest: wfs2_ndg3betaPSeries.txt ... building WFS
            http://ndg3beta.badc.rl.ac.uk/cows/mst_sample/wfs?
            building WFS http://ndg3beta.badc.rl.ac.uk/cows/mst_sample/wfs?
            building WFS http://ndg3beta.badc.rl.ac.uk/cows/mst_sample/wfs?
            building WFS http://ndg3beta.badc.rl.ac.uk/cows/mst_sample/wfs?
            building WFS http://ndg3beta.badc.rl.ac.uk/cows/mst_sample/wfs?
            ok
            Doctest: wcs_thredds.txt ... ok

            
======================================================================
            FAIL: Doctest: csw_gdp.txt
            
----------------------------------------------------------------------
            Traceback (most recent call last):
               File "/usr/lib/python2.6/doctest.py", line 2145, in runTest
                 raise
            self.failureException(self.format_failure(new.getvalue()))
            AssertionError: Failed doctest test for csw_gdp.txt
               File "/usr/local/OWSLib/trunk/tests/csw_gdp.txt", line 0

            
----------------------------------------------------------------------
            File "/usr/local/OWSLib/trunk/tests/csw_gdp.txt", line 47, in
            csw_gdp.txt Failed example:

            
c.getrecords(keywords=['glacial'],outputschema='http://www.fgdc.gov')
            Exception raised:
                 Traceback (most recent call last):
                   File "/usr/lib/python2.6/doctest.py", line 1241, in __run
                     compileflags, 1) in test.globs
                   File "<doctest csw_gdp.txt[27]>", line 1, in<module>

            
c.getrecords(keywords=['glacial'],outputschema='http://www.fgdc.gov')
                   File "/usr/local/OWSLib/trunk/owslib/csw.py", line 305,
            in getrecords
                     self._parserecords(outputschema, esn)
                   File "/usr/local/OWSLib/trunk/owslib/csw.py", line 416,
            in _parserecords
                     self.records[identifier] = Metadata(i)
                   File "/usr/local/OWSLib/trunk/owslib/fgdc.py", line 19,
            in __init__
                     self.idinfo = Idinfo(md)
                   File "/usr/local/OWSLib/trunk/owslib/fgdc.py", line 45,
            in __init__
                     self.keywords = Keywords(val)
                   File "/usr/local/OWSLib/trunk/owslib/fgdc.py", line
            154, in __init__
                     theme['placekt'] = util.testXMLValue(val)
                 UnboundLocalError: local variable 'theme' referenced
            before assignment


            
======================================================================
            FAIL: Doctest: wms_TelaCapabilities.txt
            
----------------------------------------------------------------------
            Traceback (most recent call last):
               File "/usr/lib/python2.6/doctest.py", line 2145, in runTest
                 raise
            self.failureException(self.format_failure(new.getvalue()))
            AssertionError: Failed doctest test for wms_TelaCapabilities.txt
               File
            "/usr/local/OWSLib/trunk/tests/wms_TelaCapabilities.txt", line 0

            
----------------------------------------------------------------------
            File
            "/usr/local/OWSLib/trunk/tests/wms_TelaCapabilities.txt",
            line 50, in wms_TelaCapabilities.txt Failed example:
                 wms['world.topo.bathy.200409'].boundingBox
            Expected:
                 (-180.0, -90.0, 180.0, 90.0, 'EPSG:4326') Got nothing


            
======================================================================
            FAIL: Doctest: ows_interfaces.txt
            
----------------------------------------------------------------------
            Traceback (most recent call last):
               File "/usr/lib/python2.6/doctest.py", line 2145, in runTest
                 raise
            self.failureException(self.format_failure(new.getvalue()))
            AssertionError: Failed doctest test for ows_interfaces.txt
               File "/usr/local/OWSLib/trunk/tests/ows_interfaces.txt",
            line 0

            
----------------------------------------------------------------------
            File "/usr/local/OWSLib/trunk/tests/ows_interfaces.txt", line
            108, in ows_interfaces.txt Failed example:
                 for service in services:
                     service.identification.type
                     type(service.contents)
            Expected:
            'CSW'
            <type 'dict'>
            'OGC:WMS'
            <type 'dict'>
            'OGC:WCS'
            <type 'dict'>
            'MapServer WFS'
            <type 'dict'>
            Got:
            'CSW'
            <type 'list'>
            'OGC:WMS'
            <type 'dict'>
            'OGC:WCS'
            <type 'dict'>
            'MapServer WFS'
            <type 'dict'>


            
======================================================================
            FAIL: Doctest: wms_JPLCapabilities.txt
            
----------------------------------------------------------------------
            Traceback (most recent call last):
               File "/usr/lib/python2.6/doctest.py", line 2145, in runTest
                 raise
            self.failureException(self.format_failure(new.getvalue()))
            AssertionError: Failed doctest test for wms_JPLCapabilities.txt
               File
            "/usr/local/OWSLib/trunk/tests/wms_JPLCapabilities.txt", line 0

            
----------------------------------------------------------------------
            File "/usr/local/OWSLib/trunk/tests/wms_JPLCapabilities.txt",
            line 57, in wms_JPLCapabilities.txt Failed example:
                 wms.contents.keys()
            Expected:
                 ['us_landsat_wgs84', 'modis', 'global_mosaic_base',
            'huemapped_srtm', 'srtm_mag', 'daily_terra', 'us_ned',
            'us_elevation', 'global_mosaic', 'daily_terra_ndvi',
            'daily_aqua_ndvi', 'daily_aqua_721', 'daily_aqua', 'BMNG',
            'srtmplus', None, 'us_colordem', 'worldwind_dem',
            'daily_terra_721']
            Got:
                 [None, 'us_landsat_wgs84', 'global_mosaic_base',
            'huemapped_srtm', 'srtm_mag', 'daily_terra', 'modis',
            'us_elevation', 'global_mosaic', 'daily_terra_ndvi',
            'daily_aqua_ndvi', 'daily_aqua_721', 'daily_aqua', 'BMNG',
            'srtmplus', 'us_colordem', 'worldwind_dem', 'us_ned',
            'daily_terra_721']


            
======================================================================
            FAIL: Doctest: wms_GeoServerCapabilities.txt
            
----------------------------------------------------------------------
            Traceback (most recent call last):
               File "/usr/lib/python2.6/doctest.py", line 2145, in runTest
                 raise
            self.failureException(self.format_failure(new.getvalue()))
            AssertionError: Failed doctest test for
            wms_GeoServerCapabilities.txt
               File
            "/usr/local/OWSLib/trunk/tests/wms_GeoServerCapabilities.txt",
            line 0

            
----------------------------------------------------------------------
            File
            "/usr/local/OWSLib/trunk/tests/wms_GeoServerCapabilities.txt",
              line 48, in wms_GeoServerCapabilities.txt Failed example:
                 wms['opengeo:poi'].boundingBox
            Expected:
                 (-74.012, 40.707999999999998, -74.001999999999995,
            40.719999999999999, 'EPSG:4326') Got nothing


            
----------------------------------------------------------------------
            Ran 13 tests in 288.546s

            FAILED (failures=5)



            On Wed, Sep 1, 2010 at 7:44 AM, Dominic Lowe
            <[email protected] <mailto:[email protected]>>
              wrote:


                    Tyler,

                    Glad you got it running.

                    What are the errors you get? Usually errors are caused
            by changes to the server implementations.

                    Regards

                    Dom



        _______________________________________________
        Community mailing list
        [email protected] <mailto:[email protected]>
        http://lists.gispython.org/mailman/listinfo/community


    _______________________________________________
    Community mailing list
    [email protected] <mailto:[email protected]>
    http://lists.gispython.org/mailman/listinfo/community




_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

_______________________________________________
Community mailing list
[email protected]
http://lists.gispython.org/mailman/listinfo/community

Reply via email to