/[thuban]/branches/WIP-pyshapelib-bramz/test/test_layer.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/test/test_layer.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 331 by bh, Fri Sep 20 14:34:23 2002 UTC revision 336 by bh, Fri Sep 20 16:26:09 2002 UTC
# Line 20  import support Line 20  import support
20  support.initthuban()  support.initthuban()
21    
22  import shapelib  import shapelib
23    import dbflib
24    
25  from Thuban.Model.layer import Layer, SHAPETYPE_POLYGON, SHAPETYPE_ARC, \  from Thuban.Model.layer import Layer, SHAPETYPE_POLYGON, SHAPETYPE_ARC, \
26       SHAPETYPE_POINT       SHAPETYPE_POINT
# Line 96  class TestLayer(unittest.TestCase, suppo Line 97  class TestLayer(unittest.TestCase, suppo
97          shapefilename = self.temp_file_name("layer_empty.shp")          shapefilename = self.temp_file_name("layer_empty.shp")
98          shp = shapelib.create(shapefilename, shapelib.SHPT_POLYGON)          shp = shapelib.create(shapefilename, shapelib.SHPT_POLYGON)
99          shp.close()          shp.close()
100            # create an empty DBF file too because Thuban can't cope yet
101            # with missing DBF file.
102            dbffilename = self.temp_file_name("layer_empty.dbf")
103            dbf = dbflib.create(dbffilename)
104            dbf.add_field("NAME", dbflib.FTString, 20, 0)
105    
106            # Now try to open it.
107          layer = Layer("Empty Layer", shapefilename)          layer = Layer("Empty Layer", shapefilename)
108          self.assertEquals(layer.BoundingBox(), None)          self.assertEquals(layer.BoundingBox(), None)
109          self.assertEquals(layer.LatLongBoundingBox(), None)          self.assertEquals(layer.LatLongBoundingBox(), None)

Legend:
Removed from v.331  
changed lines
  Added in v.336

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26