Skip to content

Commit

Permalink
test_provider_wfs.py: partial fixes for issues with Qt6
Browse files Browse the repository at this point in the history
There are still 4 remaining failures on Qt6 builds, but that's a
start...
  • Loading branch information
rouault committed Jan 29, 2024
1 parent 4293d4f commit 543397f
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions tests/src/python/test_provider_wfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,13 @@
)
from qgis.PyQt.QtCore import (
QCoreApplication,
QDate,
QDateTime,
QEventLoop,
QObject,
Qt, QTime, QDate)
Qt,
QTime,
)
import unittest
from qgis.testing import start_app, QgisTestCase
from utilities import compareWkt, unitTestDataPath
Expand Down Expand Up @@ -4674,21 +4677,21 @@ def test_NullValues_regression_20961(self):
self.assertTrue(vl.isValid())

got_f = [f for f in vl.getFeatures()]
self.assertEqual(str(got_f[0]['type']), 'NULL')
self.assertEqual(str(got_f[0]['elevation']), 'NULL')
self.assertIsNone(got_f[0]['type'])
self.assertIsNone(got_f[0]['elevation'])
self.assertEqual(str(got_f[0]['name']), 'Xxx')
self.assertEqual(str(got_f[1]['type']), '0')
self.assertEqual(str(got_f[1]['elevation']), 'NULL')
self.assertIsNone(got_f[1]['elevation'])
self.assertEqual(str(got_f[1]['name']), 'sdf')

# Now iterate ! Regression #20961
ids = [f.id() for f in got_f]
got_f2 = [vl.getFeature(id) for id in ids]
self.assertEqual(str(got_f2[0]['type']), 'NULL')
self.assertEqual(str(got_f2[0]['elevation']), 'NULL')
self.assertIsNone(got_f2[0]['type'])
self.assertIsNone(got_f2[0]['elevation'])
self.assertEqual(str(got_f2[0]['name']), 'Xxx')
self.assertEqual(str(got_f2[1]['type']), '0')
self.assertEqual(str(got_f2[1]['elevation']), 'NULL')
self.assertIsNone(got_f2[1]['elevation'])
self.assertEqual(str(got_f2[1]['name']), 'sdf')

def testFilteredFeatureRequests(self):
Expand Down

0 comments on commit 543397f

Please sign in to comment.