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

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

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

revision 1417 by bh, Tue Jul 15 08:43:53 2003 UTC revision 1599 by bh, Mon Aug 18 12:45:28 2003 UTC
# Line 226  class SaveSessionTest(unittest.TestCase, Line 226  class SaveSessionTest(unittest.TestCase,
226          layer = RasterLayer("My RasterLayer", imgfile)          layer = RasterLayer("My RasterLayer", imgfile)
227          map.AddLayer(layer)          map.AddLayer(layer)
228    
229          filename = self.temp_file_name("save_singlemap.thuban")          filename = self.temp_file_name("%s.thuban" % self.id())
230          save_session(session, filename)          save_session(session, filename)
231          session.Destroy()          session.Destroy()
232    
# Line 242  class SaveSessionTest(unittest.TestCase, Line 242  class SaveSessionTest(unittest.TestCase,
242                               visible="true">                               visible="true">
243                  </rasterlayer>                  </rasterlayer>
244              </map>              </map>
245          </session>''' % os.path.join(os.path.dirname(__file__),          </session>''' % os.path.join(os.pardir, os.pardir, "Data", "iceland",
                                      os.pardir, "Data", "iceland",  
246                                       "island.tif")                                       "island.tif")
247          #print written_contents          #print written_contents
248          #print "********************************************"          #print "********************************************"
# Line 269  class SaveSessionTest(unittest.TestCase, Line 268  class SaveSessionTest(unittest.TestCase,
268    
269          clazz = layer.GetClassification()          clazz = layer.GetClassification()
270    
271          clazz.SetFieldInfo("AREA", None)          layer.SetClassificationColumn("AREA")
272    
273          clazz.AppendGroup(ClassGroupSingleton(42, ClassGroupProperties(),          clazz.AppendGroup(ClassGroupSingleton(42, ClassGroupProperties(),
274                                                "single"))                                                "single"))
# Line 287  class SaveSessionTest(unittest.TestCase, Line 286  class SaveSessionTest(unittest.TestCase,
286    
287    
288          clazz = layer2.GetClassification()          clazz = layer2.GetClassification()
289          clazz.SetFieldInfo("POPYCOUN", None)          layer2.SetClassificationColumn("POPYCOUN")
290    
291          # Classification with Latin 1 text          # Classification with Latin 1 text
292          clazz.AppendGroup(ClassGroupSingleton('\xe4\xf6\xfc', # ae, oe, ue          clazz.AppendGroup(ClassGroupSingleton('\xe4\xf6\xfc', # ae, oe, ue
# Line 381  class SaveSessionTest(unittest.TestCase, Line 380  class SaveSessionTest(unittest.TestCase,
380              <filetable id="D1" filename="%s" filetype="DBF" title="political"/>              <filetable id="D1" filename="%s" filetype="DBF" title="political"/>
381          </session>'''          </session>'''
382    
383          expected_contents = expected_template % dbffile          expected_contents = (expected_template
384                                 % os.path.join(os.pardir, os.pardir, "Data",
385                                                "iceland", "political.dbf"))
386          self.compare_xml(written_contents, expected_contents)          self.compare_xml(written_contents, expected_contents)
387    
388      def test_joined_table(self):      def test_joined_table(self):

Legend:
Removed from v.1417  
changed lines
  Added in v.1599

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26