summaryrefslogtreecommitdiff
path: root/tests/test_atoms.py
diff options
context:
space:
mode:
authorMartin Pitt <martinpitt@gnome.org>2012-07-31 13:13:21 +0200
committerMartin Pitt <martinpitt@gnome.org>2012-07-31 16:46:23 +0200
commit8fb18c62d9c7faff38df3886cb4289b618c81b85 (patch)
tree7cbebc13dee9fd280e2f9589bcf215cc80a5030d /tests/test_atoms.py
parenta2e73c109f3ed6080eabc85810e624b9f984317e (diff)
downloadpygobject-8fb18c62d9c7faff38df3886cb4289b618c81b85.tar.gz
Skip instead of fail tests which need Pango, Atk, Gdk, Gtk
On initial jhbuild bootstrap or restricted environments, the Pango, Atk, Gdk, and Gtk typelibs might not be available. Skip tests which need these instead of failing the testsuite.
Diffstat (limited to 'tests/test_atoms.py')
-rw-r--r--tests/test_atoms.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_atoms.py b/tests/test_atoms.py
index 851368fe..a59d15aa 100644
--- a/tests/test_atoms.py
+++ b/tests/test_atoms.py
@@ -1,8 +1,13 @@
import unittest
-from gi.repository import Gdk, Gtk
+try:
+ from gi.repository import Atk, Gdk, Gtk
+ (Atk, Gdk) # pyflakes
+except:
+ Gdk = None
+@unittest.skipUnless(Gdk, 'Gdk not available')
class TestGdkAtom(unittest.TestCase):
def test_create(self):
atom = Gdk.Atom.intern('my_string', False)