1316
1320
length, len(obj_with_len), obj_with_len))
1318
1322
def assertLogsError(self, exception_class, func, *args, **kwargs):
1322
1326
orig_log_exception_quietly = trace.log_exception_quietly
1325
1329
orig_log_exception_quietly()
1327
1331
trace.log_exception_quietly = capture
1330
1334
trace.log_exception_quietly = orig_log_exception_quietly
1331
1335
self.assertLength(1, captured)
1333
1337
self.assertIsInstance(err, exception_class)