Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Spatialite test update
  • Loading branch information
nyalldawson committed May 14, 2020
1 parent 3fae26f commit 090df69
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions tests/src/python/test_provider_spatialite.py
Expand Up @@ -280,6 +280,15 @@ def getSource(self):
'spatialite')
return vl

def treat_time_as_string(self):
return True

def treat_datetime_as_string(self):
return True

def treat_date_as_string(self):
return True

def getEditableLayer(self):
return self.getSource()

Expand Down Expand Up @@ -349,6 +358,14 @@ def uncompiledFilters(self):
'overlaps(buffer($geometry,1),geom_from_wkt( \'Polygon ((-75.1 76.1, -75.1 81.6, -68.8 81.6, -68.8 76.1, -75.1 76.1))\'))',
'intersects(centroid($geometry),geom_from_wkt( \'Polygon ((-74.4 78.2, -74.4 79.1, -66.8 79.1, -66.8 78.2, -74.4 78.2))\'))',
'intersects(point_on_surface($geometry),geom_from_wkt( \'Polygon ((-74.4 78.2, -74.4 79.1, -66.8 79.1, -66.8 78.2, -74.4 78.2))\'))',
'"dt" <= format_date(make_datetime(2020, 5, 4, 12, 13, 14), \'yyyy-MM-dd hh:mm:ss\')',
'"dt" < format_date(make_date(2020, 5, 4), \'yyyy-MM-dd hh:mm:ss\')',
'"dt" = format_date(to_datetime(\'000www14ww13ww12www4ww5ww2020\',\'zzzwwwsswwmmwwhhwwwdwwMwwyyyy\'),\'yyyy-MM-dd hh:mm:ss\')',
'"date" <= make_datetime(2020, 5, 4, 12, 13, 14)',
'"date" >= make_date(2020, 5, 4)',
'to_time("time") >= make_time(12, 14, 14)',
'to_time("time") = to_time(\'000www14ww13ww12www\',\'zzzwwwsswwmmwwhhwww\')',
'"date" = to_date(\'www4ww5ww2020\',\'wwwdwwMwwyyyy\')'
])

def partiallyCompiledFilters(self):
Expand Down
Binary file modified tests/testdata/provider/spatialite.db
Binary file not shown.

0 comments on commit 090df69

Please sign in to comment.