/[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 2104 by bh, Fri Mar 12 12:19:15 2004 UTC revision 2654 by jan, Wed Jul 27 21:44:16 2005 UTC
# Line 1  Line 1 
1  # Copyright (c) 2002, 2003, 2004 by Intevation GmbH  # Copyright (c) 2002, 2003, 2004, 2005 by Intevation GmbH
2  # Authors:  # Authors:
3  # Bernhard Herzog <[email protected]>  # Bernhard Herzog <[email protected]>
4  #  #
# Line 40  from xmlsupport import sax_eventlist Line 40  from xmlsupport import sax_eventlist
40  import dbflib  import dbflib
41  import shapelib  import shapelib
42    
43    from Thuban import internal_from_unicode
44  from Thuban.Model.save import save_session  from Thuban.Model.save import save_session
45  from Thuban.Model.load import load_session, parse_color, LoadError, \  from Thuban.Model.load import load_session, parse_color, LoadError, \
46       LoadCancelled       LoadCancelled
# Line 53  from Thuban.Model.table import DBFTable, Line 54  from Thuban.Model.table import DBFTable,
54  from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \  from Thuban.Model.label import ALIGN_CENTER, ALIGN_TOP, ALIGN_BOTTOM, \
55       ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE       ALIGN_LEFT, ALIGN_RIGHT, ALIGN_BASELINE
56    
   
57  def filenames_equal(name1, name2):  def filenames_equal(name1, name2):
58      """Return true if the filenames name1 and name2 are equal.      """Return true if the filenames name1 and name2 are equal.
59    
# Line 124  class LoadSessionTest(support.FileLoadTe Line 124  class LoadSessionTest(support.FileLoadTe
124                  print a != b and "***************" or ""                  print a != b and "***************" or ""
125                  print a                  print a
126                  print b                  print b
127    
128          self.assertEquals(el1, el2,          self.assertEquals(el1, el2,
129                            "loaded file not equivalent to the saved file")                            "loaded file not equivalent to the saved file")
130    
# Line 162  class ClassificationTest(LoadSessionTest Line 163  class ClassificationTest(LoadSessionTest
163                  props.SetLineWidth(data[CLASSES][i][GROUP_PROPS][1])                  props.SetLineWidth(data[CLASSES][i][GROUP_PROPS][1])
164                  props.SetFill(                  props.SetFill(
165                      parse_color(data[CLASSES][i][GROUP_PROPS][2]))                      parse_color(data[CLASSES][i][GROUP_PROPS][2]))
166                    if len(data[CLASSES][i][GROUP_PROPS]) > 3:
167                        props.SetSize(data[CLASSES][i][GROUP_PROPS][3])
168    
169                  if data[CLASSES][i][GROUP_TYPE] == "default":                  if data[CLASSES][i][GROUP_TYPE] == "default":
170                      g = ClassGroupDefault(props, data[CLASSES][i][GROUP_LABEL])                      g = ClassGroupDefault(props, data[CLASSES][i][GROUP_LABEL])
# Line 198  class TestSingleLayer(LoadSessionTest): Line 201  class TestSingleLayer(LoadSessionTest):
201              <parameter value="units=m"/>              <parameter value="units=m"/>
202              <parameter value="zone=27"/>              <parameter value="zone=27"/>
203          </projection>          </projection>
204          <layer shapestore="D1" visible="true"          <layer shapestore="D1" visible="true" title="K\xc3\xbcste">
205                  stroke="#000000" title="K\xc3\xbcste" stroke_width="1"              <classification>
206                  fill="None"/>                  <clnull label="">
207                        <cldata stroke="#000000" stroke_width="1" fill="None"/>
208                    </clnull>
209                </classification>
210            </layer>
211      </map>      </map>
212  </session>  </session>
213  '''  '''
# Line 212  class TestSingleLayer(LoadSessionTest): Line 219  class TestSingleLayer(LoadSessionTest):
219          self.session = session          self.session = session
220    
221          # Check the title          # Check the title
222          eq(session.Title(), "Stra\xdfen & Landmarken")          eq(session.Title(), internal_from_unicode(u"Stra\xdfen & Landmarken"))
223    
224          # the session has one map.          # the session has one map.
225          maps = session.Maps()          maps = session.Maps()
# Line 220  class TestSingleLayer(LoadSessionTest): Line 227  class TestSingleLayer(LoadSessionTest):
227    
228          # Check the map's attributes          # Check the map's attributes
229          map = maps[0]          map = maps[0]
230          eq(map.Title(), "\xdcbersicht")          eq(map.Title(), internal_from_unicode(u"\xdcbersicht"))
231          proj = map.GetProjection()          proj = map.GetProjection()
232          eq(proj.GetName(), "WGS 84 / UTM zone 27N")          eq(proj.GetName(), "WGS 84 / UTM zone 27N")
233          eq(proj.EPSGCode(), "32627")          eq(proj.EPSGCode(), "32627")
# Line 235  class TestSingleLayer(LoadSessionTest): Line 242  class TestSingleLayer(LoadSessionTest):
242    
243          # Check the layer attributes          # Check the layer attributes
244          layer = layers[0]          layer = layers[0]
245          eq(layer.Title(), "K\xfcste")          eq(layer.Title(), internal_from_unicode(u"K\xfcste"))
246          self.failUnless(filenames_equal(layer.ShapeStore().FileName(),          self.failUnless(filenames_equal(layer.ShapeStore().FileName(),
247                                          os.path.join(self.temp_dir(),                                          os.path.join(self.temp_dir(),
248                                                       os.pardir, os.pardir,                                                       os.pardir, os.pardir,
# Line 290  class TestNonAsciiColumnName(LoadSession Line 297  class TestNonAsciiColumnName(LoadSession
297              <parameter value="units=m"/>              <parameter value="units=m"/>
298              <parameter value="zone=27"/>              <parameter value="zone=27"/>
299          </projection>          </projection>
300          <layer shapestore="D1" visible="true"          <layer shapestore="D1" visible="true" title="layer">
                 stroke="#000000" title="layer" stroke_width="1"  
                 fill="None">  
301              <classification field="Fl\xc3\xa4che" field_type="double">              <classification field="Fl\xc3\xa4che" field_type="double">
302                  <clnull label="">                  <clnull label="">
303                      <cldata stroke="#000000" stroke_width="1" fill="None"/>                      <cldata stroke="#000000" stroke_width="1" fill="None"/>
# Line 365  class TestLayerVisibility(LoadSessionTes Line 370  class TestLayerVisibility(LoadSessionTes
370              <parameter value="proj=utm"/>              <parameter value="proj=utm"/>
371              <parameter value="ellps=clrk66"/>              <parameter value="ellps=clrk66"/>
372          </projection>          </projection>
373          <layer shapestore="D1" visible="false" stroke="#000000"          <layer shapestore="D1" visible="false" title="My Layer">
374                  title="My Layer" stroke_width="1" fill="None"/>              <classification>
375                    <clnull label="">
376                        <cldata stroke="#000000" stroke_width="1" fill="None"/>
377                    </clnull>
378                </classification>
379            </layer>
380      </map>      </map>
381  </session>  </session>
382  '''  '''
# Line 388  class TestLayerVisibility(LoadSessionTes Line 398  class TestLayerVisibility(LoadSessionTes
398          self.check_format()          self.check_format()
399    
400    
401    class TestSymbolSize(ClassificationTest):
402    
403        file_contents = '''\
404    <?xml version="1.0" encoding="UTF-8"?>
405    <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
406    <session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" title="Thuban sample session">
407        <fileshapesource filetype="shapefile" id="D813968480" filename="../../Data/iceland/cultural_landmark-point.shp"/>
408        <map title="Iceland map">
409            <layer title="cultural_landmark-point" shapestore="D813968480" visible="true">
410                <classification field="CLPTLABEL" field_type="string">
411                    <clnull label="">
412                        <cldata stroke="#000000" stroke_width="1" size="3" fill="#000000"/>
413                    </clnull>
414                    <clpoint label="" value="RUINS">
415                        <cldata stroke="#000000" stroke_width="1" size="6" fill="#ffffff"/>
416                    </clpoint>
417                    <clpoint label="" value="FARM">
418                        <cldata stroke="#000000" stroke_width="1" size="9" fill="#ffff00"/>
419                    </clpoint>
420                </classification>
421            </layer>
422        </map>
423    </session>
424    '''
425    
426        def test(self):
427            """Test that the size attribute for point symbols is correctly
428            loaded for a layer."""
429            eq = self.assertEquals
430            session = load_session(self.filename())
431            self.session = session
432    
433            map = session.Maps()[0] # only one map in the sample
434    
435            expected = [("cultural_landmark-point", 2,
436                            [("default", (), "",
437                                ("#000000", 1, "#000000", 3)),
438                             ("single", "RUINS", "",
439                                ("#000000", 1, "#ffffff", 6)),
440                             ("single", "FARM", "",
441                                ("#000000", 1, "#ffff00", 9))])]
442    
443            self.TestLayers(map.Layers(), expected)
444    
445            self.check_format()
446    
447    
448  class TestClassification(ClassificationTest):  class TestClassification(ClassificationTest):
449    
450      file_contents = '''\      file_contents = '''\
# Line 405  class TestClassification(ClassificationT Line 462  class TestClassification(ClassificationT
462              <parameter value="proj=utm"/>              <parameter value="proj=utm"/>
463              <parameter value="ellps=clrk66"/>              <parameter value="ellps=clrk66"/>
464          </projection>          </projection>
465          <layer shapestore="D138389860" visible="true" stroke="#000000"          <layer shapestore="D138389860" visible="true" title="My Layer">
                 title="My Layer" stroke_width="1" fill="None">  
466              <classification field="POPYREG" field_type="string">              <classification field="POPYREG" field_type="string">
467                  <clnull label="">                  <clnull label="">
468                      <cldata stroke="#000000" stroke_width="1" fill="None"/>                      <cldata stroke="#000000" stroke_width="1" fill="None"/>
# Line 423  class TestClassification(ClassificationT Line 479  class TestClassification(ClassificationT
479                  </clpoint>                  </clpoint>
480              </classification>              </classification>
481          </layer>          </layer>
482          <layer shapestore="D138504492" visible="true" stroke="#000000"          <layer shapestore="D138504492" visible="true" title="My Layer 2">
                 title="My Layer 2" stroke_width="2" fill="None">  
483              <classification field="AREA" field_type="double">              <classification field="AREA" field_type="double">
484                  <clnull label="">                  <clnull label="">
485                      <cldata stroke="#000000" stroke_width="2" fill="None"/>                      <cldata stroke="#000000" stroke_width="2" fill="None"/>
# Line 461  class TestClassification(ClassificationT Line 516  class TestClassification(ClassificationT
516                              ("#000000", 2, "None")),                              ("#000000", 2, "None")),
517                           ("single", "1", "",                           ("single", "1", "",
518                              ("#000000", 10, "None")),                              ("#000000", 10, "None")),
519                           ("single", "\xe4\xf6\xfc", "\xdcml\xe4uts",                           ("single", internal_from_unicode(u"\xe4\xf6\xfc"),
520                              internal_from_unicode(u"\xdcml\xe4uts"),
521                              ("#000000", 1, "None"))]),                              ("#000000", 1, "None"))]),
522                       ("My Layer 2", 4,                       ("My Layer 2", 4,
523                           [("default", (), "",                           [("default", (), "",
# Line 495  class TestLabels(ClassificationTest): Line 551  class TestLabels(ClassificationTest):
551              <parameter value="proj=utm"/>              <parameter value="proj=utm"/>
552              <parameter value="ellps=clrk66"/>              <parameter value="ellps=clrk66"/>
553          </projection>          </projection>
554          <layer shapestore="D1" visible="true" stroke="#000000"          <layer shapestore="D1" visible="true" title="My Layer">
                 title="My Layer" stroke_width="1" fill="None">  
555              <classification field="POPYREG" field_type="string">              <classification field="POPYREG" field_type="string">
556                  <clnull label="hallo">                  <clnull label="hallo">
557                      <cldata stroke="#000000" stroke_width="1" fill="None"/>                      <cldata stroke="#000000" stroke_width="1" fill="None"/>
# Line 545  class TestLayerProjection(LoadSessionTes Line 600  class TestLayerProjection(LoadSessionTes
600              <parameter value="proj=utm"/>              <parameter value="proj=utm"/>
601              <parameter value="ellps=clrk66"/>              <parameter value="ellps=clrk66"/>
602          </projection>          </projection>
603          <layer shapestore="D4" visible="true" stroke="#000000"          <layer shapestore="D4" visible="true" title="My Layer">
                 title="My Layer" stroke_width="1" fill="None">  
604              <projection name="hello">              <projection name="hello">
605                  <parameter value="zone=13"/>                  <parameter value="zone=13"/>
606                  <parameter value="proj=tmerc"/>                  <parameter value="proj=tmerc"/>
# Line 561  class TestLayerProjection(LoadSessionTes Line 615  class TestLayerProjection(LoadSessionTes
615                  </clpoint>                  </clpoint>
616              </classification>              </classification>
617          </layer>          </layer>
618          <layer shapestore="D2" visible="true" stroke="#000000"          <layer shapestore="D2" visible="true" title="My Layer">
                 title="My Layer" stroke_width="1" fill="None">  
619              <projection name="Unknown">              <projection name="Unknown">
620                  <parameter value="proj=lcc"/>                  <parameter value="proj=lcc"/>
621                  <parameter value="lat_1=10"/>                  <parameter value="lat_1=10"/>
622                  <parameter value="lat_2=20"/>                  <parameter value="lat_2=20"/>
623                  <parameter value="ellps=clrk66"/>                  <parameter value="ellps=clrk66"/>
624              </projection>              </projection>
625                <classification>
626                    <clnull label="">
627                        <cldata stroke="#000000" stroke_width="1" fill="None"/>
628                    </clnull>
629                </classification>
630          </layer>          </layer>
631      </map>      </map>
632  </session>  </session>
# Line 615  class TestRasterLayer(LoadSessionTest): Line 673  class TestRasterLayer(LoadSessionTest):
673          title="single map&amp;layer">          title="single map&amp;layer">
674      <map title="Test Map">      <map title="Test Map">
675          <rasterlayer visible="false" filename="../../Data/iceland/island.tif"          <rasterlayer visible="false" filename="../../Data/iceland/island.tif"
676                  title="My RasterLayer"/>                  title="My RasterLayer" opacity="0.4" masktype="alpha"/>
677      </map>      </map>
678  </session>  </session>
679  '''  '''
# Line 632  class TestRasterLayer(LoadSessionTest): Line 690  class TestRasterLayer(LoadSessionTest):
690          layer = map.Layers()[0] # one layer in the sample          layer = map.Layers()[0] # one layer in the sample
691    
692          eq(layer.Title(), "My RasterLayer")          eq(layer.Title(), "My RasterLayer")
693            eq(layer.Opacity(), 0.4)
694            eq(layer.MaskType(), layer.MASK_ALPHA)
695    
696          self.failIf(layer.Visible())          self.failIf(layer.Visible())
697          self.failUnless(filenames_equal(layer.GetImageFilename(),          self.failUnless(filenames_equal(layer.GetImageFilename(),
698                                          os.path.join(self.temp_dir(),                                          os.path.join(self.temp_dir(),
# Line 657  class TestJoinedTable(LoadSessionTest): Line 718  class TestJoinedTable(LoadSessionTest):
718      <derivedshapesource table="D136169900" shapesource="D137227612"      <derivedshapesource table="D136169900" shapesource="D137227612"
719          id="D136170932"/>          id="D136170932"/>
720      <map title="Test Map">      <map title="Test Map">
721          <layer shapestore="D136170932" visible="true" stroke="#000000"          <layer shapestore="D136170932" visible="true" title="My Layer">
722                  title="My Layer" stroke_width="1" fill="None"/>              <classification>
723                    <clnull label="">
724                        <cldata stroke="#000000" stroke_width="1" fill="None"/>
725                    </clnull>
726                </classification>
727            </layer>
728      </map>      </map>
729  </session>  </session>
730  '''  '''
# Line 707  class TestLabelLayer(LoadSessionTest): Line 773  class TestLabelLayer(LoadSessionTest):
773              <parameter value="proj=utm"/>              <parameter value="proj=utm"/>
774              <parameter value="ellps=clrk66"/>              <parameter value="ellps=clrk66"/>
775          </projection>          </projection>
776          <layer shapestore="D145265052" visible="true" stroke="#000000"          <layer shapestore="D145265052" visible="true" title="political">
                 title="political" stroke_width="1" fill="#c0c0c0">  
777              <projection name="Geographic">              <projection name="Geographic">
778                  <parameter value="proj=latlong"/>                  <parameter value="proj=latlong"/>
779                  <parameter value="to_meter=0.017453"/>                  <parameter value="to_meter=0.017453"/>
780                  <parameter value="ellps=clrk66"/>                  <parameter value="ellps=clrk66"/>
781              </projection>              </projection>
782                <classification>
783                    <clnull label="">
784                        <cldata stroke="#000000" stroke_width="1" fill="#c0c0c0"/>
785                    </clnull>
786                </classification>
787          </layer>          </layer>
788          <layer shapestore="D145412868" visible="true" stroke="#000000"          <layer shapestore="D145412868" visible="true" title="landmarks">
                 title="landmarks" stroke_width="1" fill="#ffff00">  
789              <projection name="Geographic">              <projection name="Geographic">
790                  <parameter value="proj=latlong"/>                  <parameter value="proj=latlong"/>
791                  <parameter value="to_meter=0.017453"/>                  <parameter value="to_meter=0.017453"/>
792                  <parameter value="ellps=clrk66"/>                  <parameter value="ellps=clrk66"/>
793              </projection>              </projection>
794                <classification>
795                    <clnull label="">
796                        <cldata size="5" stroke="#000000" stroke_width="1" fill="#ffff00"/>
797                    </clnull>
798                </classification>
799          </layer>          </layer>
800          <labellayer>          <labellayer>
801              <label x="-21.5" y="64.25" text="RUINS"              <label x="-21.5" y="64.25" text="RUINS"
# Line 740  class TestLabelLayer(LoadSessionTest): Line 814  class TestLabelLayer(LoadSessionTest):
814    
815          label_layer = self.session.Maps()[0].LabelLayer()          label_layer = self.session.Maps()[0].LabelLayer()
816          expected_labels = [(-21.5, 64.25, "RUINS", ALIGN_LEFT, ALIGN_CENTER),          expected_labels = [(-21.5, 64.25, "RUINS", ALIGN_LEFT, ALIGN_CENTER),
817                             (-15.125, 64.75, "H\xfctte", ALIGN_RIGHT, ALIGN_TOP),                             (-15.125, 64.75, internal_from_unicode(u"H\xfctte"),
818                                ALIGN_RIGHT, ALIGN_TOP),
819                             ]                             ]
820          for label, values in zip(label_layer.Labels(), expected_labels):          for label, values in zip(label_layer.Labels(), expected_labels):
821              self.assertEquals((label.x, label.y, label.text, label.halign,              self.assertEquals((label.x, label.y, label.text, label.halign,
# Line 931  class TestLoadError(LoadSessionTest): Line 1006  class TestLoadError(LoadSessionTest):
1006          else:          else:
1007              self.fail("Missing filetype attribute doesn't raise LoadError")              self.fail("Missing filetype attribute doesn't raise LoadError")
1008    
1009    class Shapefile_CallBack:
1010    
1011        def __init__(self, params):
1012            """Initialize the callback return values.
1013              
1014               params must be a dictionary of the potential CB modes (keys),
1015               with lists of tuples of return values as values.
1016               Depending on the test the callback can be called multiple,
1017               each time a return value is poped from the list
1018            """
1019    
1020            self.params = params
1021    
1022    
1023        def s_cb(self, filename, mode = None, second_try= 0):
1024            if self.params.has_key(mode):
1025                return self.params[mode].pop(0)
1026            else:
1027                raise LoadError
1028            
1029    class TestAltPath(LoadSessionTest):
1030    
1031        """Test the various cases in the alternative path feature.
1032    
1033           The test checks the reasonable cases:
1034           - First recognition of a path error, fixed with user interaction.
1035           - First recognition of a path error, load cancelled.
1036           - Path error fixed from list, confirmed by user.
1037           - Path error fixed from list, changed by user.
1038           - Path error fixed from list, cancelled by user.
1039           - Path error wrongly fixed from list, manual fix forced.
1040        """
1041    
1042        file_contents = '''\
1043    <?xml version="1.0" encoding="UTF-8"?>
1044    <!DOCTYPE session SYSTEM "thuban-1.1.dtd">
1045    <session xmlns="http://thuban.intevation.org/dtds/thuban-1.1-dev.dtd" title="AltPath Test session">
1046        <fileshapesource filetype="shapefile" id="D1108450956" filename="../../Data/iceland/political.shp"/>
1047        <fileshapesource filetype="shapefile" id="D1108900076" filename="../Data/iceland/roads-line.shp"/>
1048        <fileshapesource filetype="shapefile" id="D1108947244" filename="../../Data/iceland/cultural_landmark-point.shp"/>
1049        <map title="not the iceland map">
1050            <layer title="political" stroke_width="1" shapestore="D1108450956" visible="true" stroke="#000000" fill="#c0c0c0"/>
1051            <layer title="roads-line" stroke_width="1" shapestore="D1108900076" visible="true" stroke="#000000" fill="None"/>
1052            <layer title="something else" stroke_width="1" shapestore="D1108947244" visible="true" stroke="#000000" fill="None"/>
1053        </map>
1054    </session>
1055    '''
1056    
1057        def checkSession(self, session):
1058            """Check if session has been loaded successfully."""
1059            
1060            eq = self.assertEquals
1061    
1062            map = session.Maps()[0]
1063            layers = map.Layers()
1064    
1065            eq("AltPath Test session", session.Title())
1066            eq("not the iceland map", map.Title())
1067            eq(3,len(layers))
1068            eq("political",layers[0].Title())
1069            eq("roads-line",layers[1].Title())
1070            eq("something else",layers[2].Title())
1071    
1072        def test_01_single_path_error_fix(self):
1073            """Test single file path error fix."""
1074            # The usual initial case
1075            s_cb = Shapefile_CallBack({
1076                        "search": [("../Data/iceland/roads-line.shp",0)],
1077                        "check": [(None, None)]})
1078            self.session = load_session(self.filename(),
1079                                        shapefile_callback =s_cb.s_cb)
1080            self.checkSession(self.session)
1081            
1082        def test_02_path_error_fix_from_list(self):
1083            """Test single file path error fix."""
1084            # This represents the usual case for "from_list"
1085            s_cb = Shapefile_CallBack({
1086                    "search": [("../Data/iceland/roads-line.shp",1)],
1087                    "check": [(os.path.abspath("../Data/iceland/roads-line.shp"),1)]
1088                   })
1089            self.session = load_session(self.filename(),
1090                                        shapefile_callback =s_cb.s_cb)
1091            self.checkSession(self.session)
1092    
1093        def test_03_single_path_error_cancelled(self):
1094            """Test alternative path cancelled."""
1095            s_cb = Shapefile_CallBack({
1096                        "search": [(None,0)],
1097                        "check": [(None, None)]})
1098            self.assertRaises(LoadCancelled,
1099                                load_session, self.filename(), None, s_cb.s_cb)
1100    
1101        def test_04_path_error_fix_from_list_cancelled(self):
1102            """Test alternative path from list cancelled."""
1103            s_cb = Shapefile_CallBack({
1104                    "search": [("../Data/iceland/roads-line.shp",1)],
1105                    "check": [(None,1)]
1106                   })
1107            self.assertRaises(LoadCancelled,
1108                                load_session, self.filename(), None, s_cb.s_cb)
1109    
1110        def test_05_path_error_fix_from_list_changed(self):
1111            """Test alternative path from list changed."""
1112            s_cb = Shapefile_CallBack({
1113                    "search": [("../Data/iceland/roads-line.shp",1)],
1114                    "check": [("../Data/iceland/roads-line.shp",0)]
1115                   })
1116            self.session = load_session(self.filename(),
1117                                        shapefile_callback =s_cb.s_cb)
1118            self.checkSession(self.session)
1119    
1120        def test_06_path_error_fix_from_list_fails(self):
1121            """Test alternative path recovery from list."""
1122            s_cb = Shapefile_CallBack({
1123                    "search": [("../wrong/iceland/roads-line.shp",1),
1124                                ("../Data/iceland/roads-line.shp",0)],
1125                    "check": [(None,None)]
1126                   })
1127            self.session = load_session(self.filename(),
1128                                        shapefile_callback =s_cb.s_cb)
1129            self.assertRaises(IndexError,
1130                                s_cb.s_cb, None, "search")
1131            
1132    
1133    
1134  if __name__ == "__main__":  if __name__ == "__main__":
1135      support.run_tests()      support.run_tests()

Legend:
Removed from v.2104  
changed lines
  Added in v.2654

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26