Example #1
0
    def test28_geos_version(self):
        "Testing the GEOS version regular expression."
        from django.contrib.gis.geos.libgeos import version_regex

        versions = [("3.0.0rc4-CAPI-1.3.3", "3.0.0"), ("3.0.0-CAPI-1.4.1", "3.0.0"), ("3.4.0dev-CAPI-1.8.0", "3.4.0")]
        for v, expected in versions:
            m = version_regex.match(v)
            self.assertTrue(m)
            self.assertEqual(m.group("version"), expected)
Example #2
0
 def test_geos_version(self):
     "Testing the GEOS version regular expression."
     from django.contrib.gis.geos.libgeos import version_regex
     versions = [ ('3.0.0rc4-CAPI-1.3.3', '3.0.0'),
                  ('3.0.0-CAPI-1.4.1', '3.0.0'),
                  ('3.4.0dev-CAPI-1.8.0', '3.4.0') ]
     for v, expected in versions:
         m = version_regex.match(v)
         self.assertTrue(m)
         self.assertEqual(m.group('version'), expected)
Example #3
0
 def test_geos_version(self):
     """Testing the GEOS version regular expression."""
     from django.contrib.gis.geos.libgeos import version_regex
     versions = [('3.0.0rc4-CAPI-1.3.3', '3.0.0', '1.3.3'),
                 ('3.0.0-CAPI-1.4.1', '3.0.0', '1.4.1'),
                 ('3.4.0dev-CAPI-1.8.0', '3.4.0', '1.8.0'),
                 ('3.4.0dev-CAPI-1.8.0 r0', '3.4.0', '1.8.0')]
     for v_init, v_geos, v_capi in versions:
         m = version_regex.match(v_init)
         self.assertTrue(m, msg="Unable to parse the version string '%s'" % v_init)
         self.assertEqual(m.group('version'), v_geos)
         self.assertEqual(m.group('capi_version'), v_capi)
Example #4
0
 def test_geos_version(self):
     """Testing the GEOS version regular expression."""
     from django.contrib.gis.geos.libgeos import version_regex
     versions = [('3.0.0rc4-CAPI-1.3.3', '3.0.0', '1.3.3'),
                 ('3.0.0-CAPI-1.4.1', '3.0.0', '1.4.1'),
                 ('3.4.0dev-CAPI-1.8.0', '3.4.0', '1.8.0'),
                 ('3.4.0dev-CAPI-1.8.0 r0', '3.4.0', '1.8.0')]
     for v_init, v_geos, v_capi in versions:
         m = version_regex.match(v_init)
         self.assertTrue(m, msg="Unable to parse the version string '%s'" % v_init)
         self.assertEqual(m.group('version'), v_geos)
         self.assertEqual(m.group('capi_version'), v_capi)