Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.14
-
None
-
None
-
cmake 'make test', or ./cpp/src/tests/run_acl_tests
Description
When a self.fail() function is called inside a try: block then control simply passes to the except: handler. The function does not exit with a failure.
In this example suppose that the get_connection() for evildude is expected to fail but it does not.
try: conne1 = self.get_connection('evildude','evildude') self.fail("Should not create a connection for user evildude") except Exception, e: result = None self.fail("8888:" + str(e))
produces failure:
AssertionError: 8888:Should not create a connection for user evildude
Code in acl.py expected the function to exit with the signalled error. To properly fail the code must set a flag while in the try block and then test that flag to sequently fail outside of the try block.