Skip to content
Permalink
Browse files

Better tests

  • Loading branch information
nyalldawson committed Jun 2, 2018
1 parent 6430059 commit f3bc283cd58f08cf24c3ccbea1e841fe84a102de
Showing with 4 additions and 7 deletions.
  1. +4 −7 tests/src/python/test_provider_ogr_sqlite.py
@@ -254,7 +254,7 @@ def run_checks():
it = vl.getFeatures(req)
f = QgsFeature()
self.assertTrue(it.nextFeature(f))
self.assertTrue(f.id() == 5)
self.assertEqual(f.id(), 5)
self.assertEqual(f.attributes(), [5, NULL, 2, 16])
self.assertEqual([field.name() for field in f.fields()], ['fid', 'GEOMETRY', 'type', 'value'])

@@ -263,7 +263,7 @@ def run_checks():
it = vl.getFeatures(req)
f = QgsFeature()
self.assertTrue(it.nextFeature(f))
self.assertTrue(f.id() == 5)
self.assertEqual(f.id(), 5)
self.assertEqual(f.attributes(), [5, NULL, 2, 16])
self.assertEqual([field.name() for field in f.fields()], ['fid', 'GEOMETRY', 'type', 'value'])

@@ -272,7 +272,7 @@ def run_checks():
it = vl.getFeatures(req)
f = QgsFeature()
self.assertTrue(it.nextFeature(f))
self.assertTrue(f.id() == 5)
self.assertEqual(f.id(), 5)
self.assertEqual(f.attributes(), [5, NULL, 2, 16])
self.assertEqual([field.name() for field in f.fields()], ['fid', 'GEOMETRY', 'type', 'value'])

@@ -283,10 +283,7 @@ def run_checks():
ids = []
while it.nextFeature(f):
ids.append(f.id())
self.assertTrue(len(ids) == 3)
self.assertTrue(3 in ids)
self.assertTrue(4 in ids)
self.assertTrue(5 in ids)
self.assertCountEqual(ids, [3, 4, 5])

run_checks()
# Check that subset string is correctly set on reload

0 comments on commit f3bc283

Please sign in to comment.
You can’t perform that action at this time.