[Thuban-commits] r2774 - in trunk/thuban: . Thuban/Model Thuban/UI test
Bernhard Herzog
bh at intevation.de
Mon Jun 25 12:27:24 CEST 2007
scm-commit at wald.intevation.org writes:
> Modified: trunk/thuban/Thuban/UI/rasterlayerproperties.py
> ===================================================================
> --- trunk/thuban/Thuban/UI/rasterlayerproperties.py 2007-06-22 21:56:49 UTC (rev 2773)
> +++ trunk/thuban/Thuban/UI/rasterlayerproperties.py 2007-06-22 22:14:15 UTC (rev 2774)
[...]
> @@ -19,15 +20,15 @@
>
> from Thuban.version import versions
>
> -ID_RB_MASK = 4002
> +#ID_RB_MASK = 4002
>
> class RasterLayerProperties(LayerProperties):
>
> def __init__(self, parent, name, layer, *args, **kw):
> LayerProperties.__init__(self, parent, name, layer)
>
> - self.old_state = {}
> - self.old_state["mask_type"] = layer.MaskType()
> + #self.old_state = {}
> + #self.old_state["mask_type"] = layer.MaskType()
[snipped may similar changes]
We do have a version control system, so it's better to simply delete
code that's not needed anymore. In the rare cases where it makes sense
to keep some commented out code in the source file, please add a comment
why it's there.
> Modified: trunk/thuban/test/test_load.py
> ===================================================================
> --- trunk/thuban/test/test_load.py 2007-06-22 21:56:49 UTC (rev 2773)
> +++ trunk/thuban/test/test_load.py 2007-06-22 22:14:15 UTC (rev 2774)
> @@ -1,4 +1,4 @@
> -# Copyright (c) 2002, 2003, 2004, 2005 by Intevation GmbH
> +# Copyright (c) 2002, 2003, 2004, 2005, 2007 by Intevation GmbH
> # Authors:
> # Bernhard Herzog <bh at intevation.de>
> #
> @@ -699,7 +699,7 @@
> title="single map&layer">
> <map title="Test Map">
> <rasterlayer visible="false" filename="../../Data/iceland/island.tif"
> - title="My RasterLayer" opacity="0.4" masktype="alpha"/>
> + title="My RasterLayer" opacity="0.4"/>
> </map>
> </session>
> '''
AFAICT, this was the only test that tested loading of files with the
masktype attribute. Now there is no such test anymore. Assuming that
we want to Thuban to be able to read files that contain the masktype
attribute we also need tests for it. The general Thuban policy of how
to handle test cases in situations where the file format changes is
outlined at the beginning of test/test_load.py.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://skencil.org/
Thuban http://thuban.intevation.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20070625/b89a8632/attachment.bin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)