[pygobject/gsoc2009: 9/160] Add multiple output argument to Python tests



commit d6bb058f98b16dacd20d12036f279d5095d72022
Author: Simon van der Linden <simon vanderlinden student uclouvain be>
Date:   Wed Jun 24 17:30:52 2009 +0200

    Add multiple output argument to Python tests
    
    Add testUtf8OutOut and testUtf8OutNonconstReturn to test that a tuple
    containing the output arguments and the return value is returned.

 tests/test_girepository.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/tests/test_girepository.py b/tests/test_girepository.py
index 11876d0..c8d0ce7 100644
--- a/tests/test_girepository.py
+++ b/tests/test_girepository.py
@@ -198,6 +198,16 @@ class TestGIEverything(unittest.TestCase):
         self.assertEquals('\xc3\xa5\xc3\xa4\xc3\xb6', filenames[0])
         self.assertEquals('/etc/fstab', filenames[1])
 
+
+# Multiple output arguments
+
+    def testUtf8OutOut(self):
+        self.assertEquals(("first", "second"), Everything.test_utf8_out_out())
+
+    def testUtf8OutNonconstReturn(self):
+        self.assertEquals(("first", "second"), Everything.test_utf8_out_nonconst_return())
+
+
 # FIXME
 # ======================================================================
 # ERROR: testStrv (__main__.TestGIEverything)



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