AssertRaise使用Try-Except块捕获已捕获的异常

时间:2019-10-04 08:54:41

标签: python exception assert

AssertRasies正在捕获已捕获的异常-这是预期的行为吗?

self.assertRaises(LDAPSocketOpenError, test_function()) == True


try:
   ldap_connection.bind()
except LDAPSocketOpenError as ex:
   pseudocode...

0 个答案:

没有答案
相关问题