1
0
mirror of https://github.com/django/django.git synced 2024-12-29 12:36:08 +00:00
django/tests/gis_tests/gdal_tests/tests.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

17 lines
531 B
Python
Raw Normal View History

import unittest
from django.contrib.gis.gdal import GDAL_VERSION, gdal_full_version, gdal_version
class GDALTest(unittest.TestCase):
def test_gdal_version(self):
if GDAL_VERSION:
self.assertEqual(gdal_version(), ("%s.%s.%s" % GDAL_VERSION).encode())
else:
self.assertIn(b".", gdal_version())
def test_gdal_full_version(self):
full_version = gdal_full_version()
self.assertIn(gdal_version(), full_version)
self.assertTrue(full_version.startswith(b"GDAL"))