/[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 1357 by jonathan, Wed Jul 2 09:38:27 2003 UTC revision 1375 by bh, Tue Jul 8 10:53:05 2003 UTC
# Line 80  class LoadSessionTest(support.FileLoadTe Line 80  class LoadSessionTest(support.FileLoadTe
80          self.session = None          self.session = None
81    
82    
83      dtd = "http://thuban.intevation.org/dtds/thuban-0.8.dtd"      dtd = "http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd"
84      thubanids = [((dtd, n), (None, "id")) for n in      thubanids = [((dtd, n), (None, "id")) for n in
85                   ["fileshapesource", "filetable", "jointable",                   ["fileshapesource", "filetable", "jointable",
86                    "derivedshapesource"]]                    "derivedshapesource"]]
# Line 167  class TestSingleLayer(LoadSessionTest): Line 167  class TestSingleLayer(LoadSessionTest):
167    
168      file_contents = '''\      file_contents = '''\
169  <?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>
170  <!DOCTYPE session SYSTEM "thuban-0.8.dtd">  <!DOCTYPE session SYSTEM "thuban-0.9.dtd">
171  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd"  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd"
172          title="single map&amp;layer">          title="single map&amp;layer">
173      <fileshapesource filetype="shapefile" id="D1"      <fileshapesource filetype="shapefile" id="D1"
174          filename="../../Data/iceland/political.shp"/>          filename="../../Data/iceland/political.shp"/>
# Line 228  class TestLayerVisibility(LoadSessionTes Line 228  class TestLayerVisibility(LoadSessionTes
228    
229      file_contents = '''\      file_contents = '''\
230  <?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>
231  <!DOCTYPE session SYSTEM "thuban-0.8.dtd">  <!DOCTYPE session SYSTEM "thuban-0.9.dtd">
232  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd"  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd"
233          title="single map&amp;layer">          title="single map&amp;layer">
234      <fileshapesource filetype="shapefile" id="D1"      <fileshapesource filetype="shapefile" id="D1"
235          filename="../../Data/iceland/political.shp"/>          filename="../../Data/iceland/political.shp"/>
# Line 347  class TestLabels(ClassificationTest): Line 347  class TestLabels(ClassificationTest):
347    
348      file_contents = '''\      file_contents = '''\
349  <?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>
350  <!DOCTYPE session SYSTEM "thuban-0.8.dtd">  <!DOCTYPE session SYSTEM "thuban-0.9.dtd">
351  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd"  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd"
352          title="single map&amp;layer">          title="single map&amp;layer">
353      <fileshapesource filetype="shapefile" id="D1"      <fileshapesource filetype="shapefile" id="D1"
354          filename="../../Data/iceland/political.shp"/>          filename="../../Data/iceland/political.shp"/>
# Line 395  class TestLayerProjection(LoadSessionTes Line 395  class TestLayerProjection(LoadSessionTes
395    
396      file_contents = '''\      file_contents = '''\
397  <?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>
398  <!DOCTYPE session SYSTEM "thuban-0.8.dtd">  <!DOCTYPE session SYSTEM "thuban-0.9.dtd">
399  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd"  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd"
400          title="single map&amp;layer">          title="single map&amp;layer">
401      <fileshapesource filetype="shapefile" id="D2"      <fileshapesource filetype="shapefile" id="D2"
402          filename="../../Data/iceland/roads-line.shp"/>          filename="../../Data/iceland/roads-line.shp"/>
# Line 469  class TestRasterLayer(LoadSessionTest): Line 469  class TestRasterLayer(LoadSessionTest):
469    
470      file_contents = '''\      file_contents = '''\
471  <?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>
472  <!DOCTYPE session SYSTEM "thuban-0.8.dtd">  <!DOCTYPE session SYSTEM "thuban-0.9.dtd">
473  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd"  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd"
474          title="single map&amp;layer">          title="single map&amp;layer">
475      <map title="Test Map">      <map title="Test Map">
476          <rasterlayer visible="false" filename="../../Data/iceland/island.tif"          <rasterlayer visible="false" filename="../../Data/iceland/island.tif"
# Line 503  class TestRasterLayer(LoadSessionTest): Line 503  class TestRasterLayer(LoadSessionTest):
503  class TestJoinedTable(LoadSessionTest):  class TestJoinedTable(LoadSessionTest):
504    
505      file_contents = '''<?xml version="1.0" encoding="UTF-8"?>      file_contents = '''<?xml version="1.0" encoding="UTF-8"?>
506  <!DOCTYPE session SYSTEM "thuban-0.8.dtd">  <!DOCTYPE session SYSTEM "thuban-0.9.dtd">
507  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd" title="A Joined Table session">  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd" title="A Joined Table session">
508      <fileshapesource filetype="shapefile" id="D137227612"      <fileshapesource filetype="shapefile" id="D137227612"
509          filename="../../Data/iceland/roads-line.shp"/>          filename="../../Data/iceland/roads-line.shp"/>
510      <filetable filetype="DBF" filename="load_joinedtable.dbf" id="D136171140"      <filetable filetype="DBF" filename="load_joinedtable.dbf" id="D136171140"
511          title="Some Title"/>          title="Some Title"/>
512      <jointable leftcolumn="RDLNTYPE" right="D136171140"      <jointable id="D136169900" title="Joined"
513          title="Joined" rightcolumn="RDTYPE" id="D136169900" left="D137227612"/>          right="D136171140" left="D137227612"
514            leftcolumn="RDLNTYPE" rightcolumn="RDTYPE"
515            jointype="LEFT OUTER"/>
516      <derivedshapesource table="D136169900" shapesource="D137227612"      <derivedshapesource table="D136169900" shapesource="D137227612"
517          id="D136170932"/>          id="D136170932"/>
518      <map title="Test Map">      <map title="Test Map">
# Line 542  class TestJoinedTable(LoadSessionTest): Line 544  class TestJoinedTable(LoadSessionTest):
544          # FIXME: The tests shouldn't assume a certain order of the tables          # FIXME: The tests shouldn't assume a certain order of the tables
545          self.assertEquals(tables[0].Title(), "Some Title")          self.assertEquals(tables[0].Title(), "Some Title")
546          self.assertEquals(tables[1].Title(), "Joined")          self.assertEquals(tables[1].Title(), "Joined")
547            self.assertEquals(tables[1].JoinType(), "LEFT OUTER")
548          self.check_format()          self.check_format()
549    
550    
# Line 549  class TestLoadError(LoadSessionTest): Line 552  class TestLoadError(LoadSessionTest):
552    
553      file_contents = '''\      file_contents = '''\
554  <?xml version="1.0" encoding="UTF-8"?>  <?xml version="1.0" encoding="UTF-8"?>
555  <!DOCTYPE session SYSTEM "thuban-0.8.dtd">  <!DOCTYPE session SYSTEM "thuban-0.9.dtd">
556  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.8.dtd"  <session xmlns="http://thuban.intevation.org/dtds/thuban-0.9-dev.dtd"
557          title="single map&amp;layer">          title="single map&amp;layer">
558      <fileshapesource id="D1" filename="../../Data/iceland/political.shp"/>      <fileshapesource id="D1" filename="../../Data/iceland/political.shp"/>
559      <map title="Test Map">      <map title="Test Map">

Legend:
Removed from v.1357  
changed lines
  Added in v.1375

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26