[pygobject] Regression test: marshalling GValues in GHashTable



commit db7e1d078db16b6f11dee51aa97525c451346632
Author: Alberto Mardegan <alberto mardegan canonical com>
Date:   Tue Mar 27 17:34:48 2012 +0200

    Regression test: marshalling GValues in GHashTable
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668903
    
    Signed-off-by: Martin Pitt <martinpitt gnome org>

 tests/test_everything.py |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 84b7f90..b1ba009 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -169,6 +169,25 @@ class TestEverything(unittest.TestCase):
         self.assertEquals(result, ['regress'])
         result = None
 
+    def test_hash_return(self):
+        result = Everything.test_ghash_gvalue_return()
+        self.assertEquals(result['integer'], 12)
+        self.assertEquals(result['boolean'], True)
+        self.assertEquals(result['string'], 'some text')
+        strings = result['strings']
+        self.assertTrue('first' in strings)
+        self.assertTrue('second' in strings)
+        self.assertTrue('third' in strings)
+        result = None
+
+    @unittest.skip('marshalling of GStrv in GValue not working')
+    def test_hash_in_out(self):
+        result = Everything.test_ghash_gvalue_return()
+        # The following line will cause a failure, because we don't support
+        # marshalling GStrv in GValue.
+        Everything.test_ghash_gvalue_in(result)
+        result = None
+
     def test_struct_gpointer(self):
         l1 = GLib.List()
         self.assertEqual(l1.data, None)



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