Log of /branches/WIP-pyshapelib-bramz/test/mockgeo.py
Parent Directory
|
Revision Log
Revision
1593 -
(
view)
(
annotate)
-
[select for diffs]
Modified
Fri Aug 15 14:10:27 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/mockgeo.py
File length: 4362 byte(s)
Diff to
previous 1585
Change the way shapes are returned by a shape store. The
ShapesInRegion method returns an iterator over actual shape
objects instead of a list of shape ids.
* Thuban/Model/data.py (ShapefileShape.ShapeID): New. Return shape
id.
(ShapefileStore.ShapesInRegion): Return an iterator over the
shapes which yields shape objects instead of returning a list of
shape ids
(ShapefileStore.AllShapes): New. Return an iterator over all
shapes in the shape store
(DerivedShapeStore.AllShapes): New. Like in ShapefileStore
* Thuban/Model/layer.py (Layer.ShapesInRegion): Update
doc-string.
* Thuban/UI/baserenderer.py
(BaseRenderer.layer_ids, BaseRenderer.layer_shapes): Rename to
layer_shapes and make it return an iterator containg shapes
instead of a list of ids.
(BaseRenderer.draw_shape_layer): Update doc-string; Adapt to
layer_shapes() change
* Thuban/UI/renderer.py (ScreenRenderer.layer_ids)
(ScreenRenderer.layer_shapes): Rename as in BaseRenderer
* Thuban/UI/viewport.py (ViewPort._find_shape_in_layer): Adapt to
changes in the ShapesInRegion return value.
(ViewPort._get_hit_tester): Remove commented out code
* test/mockgeo.py (SimpleShapeStore.ShapesInRegion): Adapt to the
new return value.
(SimpleShapeStore.AllShapes): New. Implement this method too.
* test/test_layer.py (TestLayer.test_arc_layer)
(TestLayer.test_polygon_layer, TestLayer.test_point_layer)
(TestLayer.test_point_layer_with_projection)
(TestLayer.test_derived_store): Adapt to changes in the
ShapesInRegion return value.
* test/test_shapefilestore.py
(TestShapefileStoreArc.test_shapes_in_region)
(TestShapefileStorePolygon.test_shapes_in_region)
(TestShapefileStorePoint.test_shapes_in_region): Adapt to changes
in the ShapesInRegion return value.
(TestShapefileStorePoint.test_all_shapes)
(TestShapefileStoreArc.test_shape_shapeid): New tests for the new
methods
* test/test_derivedshapestore.py
(TestDerivedShapeStore.test_shapes_in_region): Adapt to changes in
the ShapesInRegion return value.
(TestDerivedShapeStore.test_all_shapes)
(TestDerivedShapeStore.test_shape_shapeid): New tests for the new
methods
Revision
1585 -
(
view)
(
annotate)
-
[selected]
Added
Fri Aug 15 10:26:40 2003 UTC
(21 years, 6 months ago)
by
bh
Original Path:
trunk/thuban/test/mockgeo.py
File length: 4246 byte(s)
Move some of the mock objects in test_baserenderer into their own
module so they can easily be used from other tests
* test/mockgeo.py: New test helper module with some mock objects
for geometry related things like shapes, shapestores and
projections.
* test/test_mockgeo.py: New. Tests for the new helper module
* test/test_baserenderer.py: Some of the mock-objects are in mockgeo now.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.