BIND 10 trac3095, updated. 4cfee008f5fff875b90416b3318f4b8e63b8d7e3 [3095] Assert that the main() function is called when passed to the traceback handler

BIND 10 source code commits bind10-changes at lists.isc.org
Thu Sep 12 12:56:42 UTC 2013


The branch, trac3095 has been updated
       via  4cfee008f5fff875b90416b3318f4b8e63b8d7e3 (commit)
       via  b1274061b9157ca486c9406422de7b913b904856 (commit)
      from  223d4a422bf123539160029f40e0a0fdfeaac8b0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4cfee008f5fff875b90416b3318f4b8e63b8d7e3
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Sep 12 18:26:32 2013 +0530

    [3095] Assert that the main() function is called when passed to the traceback handler

commit b1274061b9157ca486c9406422de7b913b904856
Author: Mukund Sivaraman <muks at isc.org>
Date:   Thu Sep 12 18:25:12 2013 +0530

    [3095] Test the case where nothing is returned

-----------------------------------------------------------------------

Summary of changes:
 .../isc/util/tests/traceback_handler_test.py       |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

-----------------------------------------------------------------------
diff --git a/src/lib/python/isc/util/tests/traceback_handler_test.py b/src/lib/python/isc/util/tests/traceback_handler_test.py
index 99b510d..728b0b9 100644
--- a/src/lib/python/isc/util/tests/traceback_handler_test.py
+++ b/src/lib/python/isc/util/tests/traceback_handler_test.py
@@ -42,11 +42,27 @@ class TracebackHandlerTest(unittest.TestCase):
         Test the handler doesn't influence the result of successful
         function.
         """
+        self.called = False
         def succ():
+            self.called = True
             return 42
 
         self.assertEqual(42,
                          isc.util.traceback_handler.traceback_handler(succ))
+        self.assertTrue(self.called)
+
+    def test_success_no_returned_value(self):
+        """
+        Test the handler handles the case where main() returns nothing.
+        """
+        self.called = False
+        def succ():
+            self.called = True
+            return
+
+        self.assertEqual(None,
+                         isc.util.traceback_handler.traceback_handler(succ))
+        self.assertTrue(self.called)
 
     def test_exception(self):
         """



More information about the bind10-changes mailing list