[pygobject] tests_gio: Don't depend on the order of keys returned by Gio.Settings.list_keys()



commit 85a028190f05c87fc26537d212d4fe8fb53fee1d
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Sun Nov 4 17:42:58 2018 +0100

    tests_gio: Don't depend on the order of keys returned by Gio.Settings.list_keys()
    
    The order is different with glib master and makes the test fail. My guess is that
    this is due to the recent hash table changes in glib.
    
    Convert things to a set before comparing.

 tests/test_gio.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test_gio.py b/tests/test_gio.py
index b5fcdf3c..f3111ea3 100644
--- a/tests/test_gio.py
+++ b/tests/test_gio.py
@@ -67,9 +67,9 @@ class TestGSettings(unittest.TestCase):
         self.settings.reset('test-enum')
 
     def test_iter(self):
-        assert list(self.settings) == [
+        assert set(list(self.settings)) == set([
             'test-tuple', 'test-array', 'test-boolean', 'test-string',
-            'test-enum', 'test-range']
+            'test-enum', 'test-range'])
 
     def test_get_set(self):
         for key in self.settings:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]