[pygobject] tests: Update tests for static binding protection to check AttributeErrors



commit 3f9b5f890ad1292f12eba1e545084de80b76dab7
Author: Simon Feltman <sfeltman src gnome org>
Date:   Tue Aug 12 22:19:24 2014 -0700

    tests: Update tests for static binding protection to check AttributeErrors

 tests/test_import_machinery.py |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/tests/test_import_machinery.py b/tests/test_import_machinery.py
index e4c3a7b..f68f522 100644
--- a/tests/test_import_machinery.py
+++ b/tests/test_import_machinery.py
@@ -62,23 +62,23 @@ class TestModule(unittest.TestCase):
         # Importing old static bindings once gi has been imported should not
         # crash but instead give back a dummy module which produces RuntimeErrors
         # on access.
-        with self.assertRaises(RuntimeError):
+        with self.assertRaises(AttributeError):
             import gobject
             gobject.anything
 
-        with self.assertRaises(RuntimeError):
+        with self.assertRaises(AttributeError):
             import glib
             glib.anything
 
-        with self.assertRaises(RuntimeError):
+        with self.assertRaises(AttributeError):
             import gio
             gio.anything
 
-        with self.assertRaises(RuntimeError):
+        with self.assertRaises(AttributeError):
             import gtk
             gtk.anything
 
-        with self.assertRaises(RuntimeError):
+        with self.assertRaises(AttributeError):
             import gtk.gdk
             gtk.gdk.anything
 


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