bh: thuban/test test_layer.py,1.36,1.37
cvs@intevation.de
cvs at intevation.de
Tue Jul 5 18:30:53 CEST 2005
Author: bh
Update of /thubanrepository/thuban/test
In directory doto:/tmp/cvs-serv22993/test
Modified Files:
test_layer.py
Log Message:
* Thuban/Model/layer.py (Layer.__mangle_bounding_box)
(Layer.ClipBoundingBox): Rename ClipBoundingBox to
__mangle_bounding_box. See the comments in the code and RT #2845
* test/test_layer.py (TestLayer.test_arc_layer_with_projection):
Remove the explicit test of ClipBoundingBox. The method isn't
public anymore and the direct call in the test wasn't necessary in
the first place. If ClipBoundingBox (now __mangle_bounding_box)
isn't called, the return value of ShapesInRegion will be
different.
Index: test_layer.py
===================================================================
RCS file: /thubanrepository/thuban/test/test_layer.py,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- test_layer.py 23 Mar 2005 15:30:27 -0000 1.36
+++ test_layer.py 5 Jul 2005 16:30:51 -0000 1.37
@@ -1,4 +1,4 @@
-# Copyright (c) 2002, 2003, 2004 by Intevation GmbH
+# Copyright (c) 2002, 2003, 2004, 2005 by Intevation GmbH
# Authors:
# Bernhard Herzog <bh at intevation.de>
#
@@ -191,8 +191,9 @@
self.assertFloatSeqEqual(layer.ShapesBoundingBox([0]),
(90.0, -8.90043373, 120, 11.1616263))
- self.assertFloatSeqEqual(layer.ClipBoundingBox((-180, -6, 100, +120)),
- (90.0, -6, 100, 11.1616263))
+ # Test a very large bounding box in the query. Naive inverse
+ # projection will create infs instead of proper coordinate
+ # values and a different result (an empty list instead of [0])
shapes = layer.ShapesInRegion((-180, -170, 200, +120))
self.assertEquals([s.ShapeID() for s in shapes],[0])
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)