Skip to content
Permalink
Browse files

Added case insensitive filter prefix checks

  • Loading branch information
uclaros authored and nyalldawson committed Jan 18, 2020
1 parent 0340aad commit b6479c65ae76c7e104021af915fb1f35bfd330c2
Showing with 12 additions and 0 deletions.
  1. +12 −0 tests/src/python/test_qgslocator.py
@@ -226,6 +226,11 @@ def got_hit(result):
QCoreApplication.processEvents()
self.assertEqual(got_hit._results_, [])
got_hit._results_ = []
l.fetchResults('AaA a', context)
for i in range(100):
sleep(0.002)
QCoreApplication.processEvents()
self.assertEqual(set(got_hit._results_), {'a0', 'a1', 'a2'})

# test with two filters
filter_b = test_filter('b', 'bbb')
@@ -278,6 +283,13 @@ def got_hit(result):
sleep(0.002)
QCoreApplication.processEvents()
self.assertEqual(set(got_hit._results_), {'custom0', 'custom1', 'custom2'})
filter_c.setUseWithoutPrefix(False)
got_hit._results_ = []
l.fetchResults('XyZ b', context)
for i in range(100):
sleep(0.002)
QCoreApplication.processEvents()
self.assertEqual(set(got_hit._results_), {'custom0', 'custom1', 'custom2'})
l.deregisterFilter(filter_c)

del l

0 comments on commit b6479c6

Please sign in to comment.
You can’t perform that action at this time.