summaryrefslogtreecommitdiff
path: root/tests/test_gi.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_gi.py')
-rw-r--r--tests/test_gi.py25
1 files changed, 24 insertions, 1 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py
index fa9df70..50146a4 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -915,7 +915,6 @@ class TestGValue(unittest.TestCase):
def test_gvalue_in(self):
GIMarshallingTests.gvalue_in(42)
- self.assertRaises(TypeError, GIMarshallingTests.gvalue_in, None)
def test_gvalue_out(self):
self.assertEquals(42, GIMarshallingTests.gvalue_out())
@@ -1510,3 +1509,27 @@ class TestOverrides(unittest.TestCase):
def test_module_name(self):
self.assertEquals(GIMarshallingTests.OverridesStruct.__module__, 'gi.overrides.GIMarshallingTests')
self.assertEquals(GObject.InitiallyUnowned.__module__, 'gi.repository.GObject')
+
+class TestDir(unittest.TestCase):
+ def test_members_list(self):
+ list = dir(GIMarshallingTests)
+ self.assertTrue('OverridesStruct' in list)
+ self.assertTrue('BoxedStruct' in list)
+ self.assertTrue('OVERRIDES_CONSTANT' in list)
+ self.assertTrue('GEnum' in list)
+ self.assertTrue('int32_return_max' in list)
+
+ def test_modules_list(self):
+ import gi.repository
+ list = dir(gi.repository)
+ self.assertTrue('GIMarshallingTests' in list)
+
+ # FIXME: test to see if a module which was not imported is in the list
+ # we should be listing every typelib we find, not just the ones
+ # which are imported
+ #
+ # to test this I recommend we compile a fake module which
+ # our tests would never import and check to see if it is
+ # in the list:
+ #
+ # self.assertTrue('DoNotImportDummyTests' in list)