53 |
from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \ |
from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \ |
54 |
ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE |
ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE |
55 |
|
|
|
|
|
56 |
def filenames_equal(name1, name2): |
def filenames_equal(name1, name2): |
57 |
"""Return true if the filenames name1 and name2 are equal. |
"""Return true if the filenames name1 and name2 are equal. |
58 |
|
|
123 |
print a != b and "***************" or "" |
print a != b and "***************" or "" |
124 |
print a |
print a |
125 |
print b |
print b |
126 |
|
|
127 |
self.assertEquals(el1, el2, |
self.assertEquals(el1, el2, |
128 |
"loaded file not equivalent to the saved file") |
"loaded file not equivalent to the saved file") |
129 |
|
|
663 |
<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" |
<session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" |
664 |
title="single map&layer"> |
title="single map&layer"> |
665 |
<map title="Test Map"> |
<map title="Test Map"> |
666 |
<rasterlayer visible="false" filename="../../Data/iceland/island.tif" |
<rasterlayer visible="false" use_mask="true" filename="../../Data/iceland/island.tif" |
667 |
title="My RasterLayer"/> |
title="My RasterLayer"/> |
668 |
</map> |
</map> |
669 |
</session> |
</session> |
680 |
|
|
681 |
layer = map.Layers()[0] # one layer in the sample |
layer = map.Layers()[0] # one layer in the sample |
682 |
|
|
683 |
|
layer.SetUseMask(True) |
684 |
|
|
685 |
eq(layer.Title(), "My RasterLayer") |
eq(layer.Title(), "My RasterLayer") |
686 |
self.failIf(layer.Visible()) |
self.failIf(layer.Visible()) |
687 |
self.failUnless(filenames_equal(layer.GetImageFilename(), |
self.failUnless(filenames_equal(layer.GetImageFilename(), |