'Testing the `length` GeoQuerySet method.'

def test07_length(self):

    len_m1 = 473504.769553813
    len_m2 = 4617.668
    if spatialite:
        self.assertRaises(ValueError, Interstate.objects.length)
    else:
        qs = Interstate.objects.length()
        if oracle:
            tol = 2
        else:
            tol = 5
        self.assertAlmostEqual(len_m1, qs[0].length.m, tol)
    i10 = SouthTexasInterstate.objects.length().get(name='I-10')
    self.assertAlmostEqual(len_m2, i10.length.m, 2)
