Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add test of load_layer via qgis_process
  • Loading branch information
nyalldawson committed Jan 9, 2023
1 parent b23eb1d commit 0474828
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/src/python/test_qgsprocessexecutable_pt2.py
Expand Up @@ -299,6 +299,12 @@ def testComplexParameterNames(self):
self.assertIn('OUTPUT: abc:def', output)
self.assertEqual(rc, 0)

def testLoadLayer(self):
rc, output, err = self.run_process(['run', '--no-python', 'native:raiseexception', '--MESSAGE=CONFIRMED', '--CONDITION=layer_property(load_layer(\'{}\',\'ogr\'),\'feature_count\')>10'.format(TEST_DATA_DIR + '/points.shp')])
self.assertIn('CONFIRMED', self._strip_ignorable_errors(err))

self.assertEqual(rc, 1)


if __name__ == '__main__':
# look for qgis bin path
Expand Down

0 comments on commit 0474828

Please sign in to comment.