Skip to content

Commit 4af24bf

Browse files
committed
More provider check handling of extra fields
1 parent 7711f13 commit 4af24bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/src/python/featuresourcetestbase.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ def testGetFeatures(self, source=None, extra_features=[], skip_features=[], chan
7575
while it.nextFeature(f):
7676
# expect feature to be valid
7777
self.assertTrue(f.isValid())
78-
# split off the first 5 attributes only - some source test datasets will include
79-
# additional attributes which we ignore
80-
attrs = f.attributes()[0:5]
78+
# some source test datasets will include additional attributes which we ignore,
79+
# so cherry pick desired attributes
80+
attrs = [f['pk'], f['cnt'], f['name'], f['name2'], f['num_char']]
8181
# force the num_char attribute to be text - some sources (e.g., delimited text) will
8282
# automatically detect that this attribute contains numbers and set it as a numeric
8383
# field

0 commit comments

Comments
 (0)