[pygobject] test_atoms: handle missing axes labels. Fixes #300



commit 208a6295893d9da6e511d9f1a09be0ebe8eec646
Author: Christoph Reiter <reiter christoph gmail com>
Date:   Mon Jan 28 16:53:25 2019 +0100

    test_atoms: handle missing axes labels. Fixes #300

 tests/test_atoms.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test_atoms.py b/tests/test_atoms.py
index 0068723b..26d5c43a 100644
--- a/tests/test_atoms.py
+++ b/tests/test_atoms.py
@@ -97,5 +97,5 @@ class TestGdkAtom(unittest.TestCase):
             dm = display.get_device_manager()
             device = dm.get_client_pointer()
         axes = device.list_axes()
-        axes_names = [atom.name() for atom in axes]
-        self.assertNotEqual(axes_names, [])
+        axes_names = [atom.name() for atom in axes if atom is not None]
+        assert all(isinstance(name, str) for name in axes_names)


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