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

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

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

revision 2456 by frank, Wed Dec 15 09:44:34 2004 UTC revision 2620 by jonathan, Fri May 6 14:19:23 2005 UTC
# Line 53  from Thuban.Model.table import DBFTable, Line 53  from Thuban.Model.table import DBFTable,
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    
# Line 124  class LoadSessionTest(support.FileLoadTe Line 123  class LoadSessionTest(support.FileLoadTe
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    
# Line 664  class TestRasterLayer(LoadSessionTest): Line 664  class TestRasterLayer(LoadSessionTest):
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" filename="../../Data/iceland/island.tif"
667                  title="My RasterLayer"/>                  title="My RasterLayer" opacity="0.4" masktype="alpha"/>
668      </map>      </map>
669  </session>  </session>
670  '''  '''
# Line 681  class TestRasterLayer(LoadSessionTest): Line 681  class TestRasterLayer(LoadSessionTest):
681          layer = map.Layers()[0] # one layer in the sample          layer = map.Layers()[0] # one layer in the sample
682    
683          eq(layer.Title(), "My RasterLayer")          eq(layer.Title(), "My RasterLayer")
684            eq(layer.Opacity(), 0.4)
685            eq(layer.MaskType(), layer.MASK_ALPHA)
686    
687          self.failIf(layer.Visible())          self.failIf(layer.Visible())
688          self.failUnless(filenames_equal(layer.GetImageFilename(),          self.failUnless(filenames_equal(layer.GetImageFilename(),
689                                          os.path.join(self.temp_dir(),                                          os.path.join(self.temp_dir(),
# Line 1045  class TestAltPath(LoadSessionTest): Line 1048  class TestAltPath(LoadSessionTest):
1048    
1049      def test_01_single_path_error_fix(self):      def test_01_single_path_error_fix(self):
1050          """Test single file path error fix."""          """Test single file path error fix."""
           
         eq = self.assertEquals  
           
1051          # The usual initial case          # The usual initial case
1052          s_cb = Shapefile_CallBack({          s_cb = Shapefile_CallBack({
1053                      "search": [("../Data/iceland/roads-line.shp",0)],                      "search": [("../Data/iceland/roads-line.shp",0)],

Legend:
Removed from v.2456  
changed lines
  Added in v.2620

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26