nhueffme: thuban/Extensions/ogr/test __init__.py, NONE, 1.1 test_OGRShapestore.py, NONE, 1.1
Bernhard Herzog
bh at intevation.de
Mon Dec 13 20:39:17 CET 2004
cvs at intevation.de writes:
> --- NEW FILE: test_OGRShapestore.py ---
One more thing:
If ogr is not installed, i.e. when import ogr raises an ImportError, the
tests fail with
Traceback (most recent call last):
File "../Extensions/ogr/test/test_OGRShapestore.py", line 49, in setUp
self.store = OGRShapeStore(self.session, self.filename, "roads-line")
File "../Extensions/ogr/ogrshapes.py", line 113, in __init__
self.ogrdatasource = ogr.Open(self.filename)
AttributeError: 'NoneType' object has no attribute 'Open'
The tests should raise SkipTest when ogr is not available. It's best to
do that in the setUp method, so that you don't have to put it into each
and every test_* method.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)