Untitled

mail@pastecode.io avatar
unknown
python
a year ago
319 B
2
Indexable
Never
    def test_filter_fid(self) -> None:
        db_path = Path(__file__).parent.joinpath("data/base_test.db")
        provider = DuckdbProvider(uri=f"path={db_path} table=cities epsg=4326")
        req = QgsFeatureRequest()
        req.setFilterFids([1])
        self.assertEqual(len(list(provider.getFeatures(req))), 1)