Browse Source

[3095] Test the case where nothing is returned

Mukund Sivaraman 11 years ago
parent
commit
b1274061b9
1 changed files with 10 additions and 0 deletions
  1. 10 0
      src/lib/python/isc/util/tests/traceback_handler_test.py

+ 10 - 0
src/lib/python/isc/util/tests/traceback_handler_test.py

@@ -48,6 +48,16 @@ class TracebackHandlerTest(unittest.TestCase):
         self.assertEqual(42,
                          isc.util.traceback_handler.traceback_handler(succ))
 
+    def test_success_no_returned_value(self):
+        """
+        Test the handler handles the case where main() returns nothing.
+        """
+        def succ():
+            return
+
+        self.assertEqual(None,
+                         isc.util.traceback_handler.traceback_handler(succ))
+
     def test_exception(self):
         """
         Test the exception is caught and logged, but not propagated.