Skip to content

Commit d7fc489

Browse files
lightmareartemp
authored andcommitted
fix postgis test
1 parent 8139e5c commit d7fc489

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/python_tests/postgis_test.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def create_ds():
728728
table='test',
729729
max_size=20,
730730
geometry_field='geom')
731-
fs = ds.all_features()
731+
fs = list(ds.all_features())
732732
eq_(len(fs), 8)
733733

734734
meta = ds.describe()
@@ -967,8 +967,7 @@ def test_psql_error_should_not_break_connection_pool():
967967
failed = False
968968
try:
969969
fs = ds_bad.featureset()
970-
for feature in fs.features:
971-
pass
970+
count = sum(1 for f in fs)
972971
except RuntimeError as e:
973972
assert 'invalid input syntax for integer' in str(e)
974973
failed = True
@@ -977,9 +976,7 @@ def test_psql_error_should_not_break_connection_pool():
977976

978977
# Should be ok
979978
fs = ds_good.featureset()
980-
count = 0
981-
for feature in fs.features:
982-
count += 1
979+
count = sum(1 for f in fs)
983980
eq_(count, 8)
984981

985982
def test_psql_error_should_give_back_connections_opened_for_lower_layers_to_the_pool():

0 commit comments

Comments
 (0)