示例#1
0
 def test_populate_auto_increment_id(self):
     import arcpy
     arcpy.env.overwriteOutput = True
     arcpy.CopyRows_management(self.table, self.temp_table)
     with arcpy.da.InsertCursor(self.temp_table, ["TextField"]) as iCursor:
         iCursor.insertRow(("x",))
         iCursor.insertRow(("y",))
         iCursor.insertRow(("z",))
     fieldvalue_util.populate_auto_increment_id(self.temp_table, "NumberField", existing_max_id=4)
     self.assertEqual(fieldvalue_util.get_maximum_id(self.temp_table, "NumberField"), 7)
示例#2
0
    def test_populate_auto_increment_id(self):
        import arcpy

        arcpy.env.overwriteOutput = True
        arcpy.CopyRows_management(self.table, self.temp_table)
        with arcpy.da.InsertCursor(self.temp_table, ["TextField"]) as iCursor:
            iCursor.insertRow(("x",))
            iCursor.insertRow(("y",))
            iCursor.insertRow(("z",))
        fieldvalue_util.populate_auto_increment_id(self.temp_table, "NumberField", existing_max_id=4)
        self.assertEqual(fieldvalue_util.get_maximum_id(self.temp_table, "NumberField"), 7)
示例#3
0
 def test_get_maximum_id(self):
     self.assertEqual(fieldvalue_util.get_maximum_id(self.table, "OBJECTID"), 4)
示例#4
0
 def test_get_maximum_id(self):
     self.assertEqual(fieldvalue_util.get_maximum_id(self.table, "OBJECTID"), 4)