#NEWLINE# @ capture_logging ( None ) #NEWLINE# def test_open_ports_errors_all_logged( self , logger ) : #NEWLINE# #INDENT# '\n        Exceptions raised in `OpenPorts` operations are all logged.\n        ' #NEWLINE# fake_network = make_memory_network ( ) #NEWLINE# fake_network . open_port = ( lambda port : ( 1 / 0 ) ) #NEWLINE# api = ApplicationNodeDeployer ( 'example.com' , docker_client = FakeDockerClient ( ) , network = fake_network ) #NEWLINE# d = OpenPorts ( ports = [ OpenPort ( port = 3306 ) , OpenPort ( port = 3307 ) , OpenPort ( port = 3308 ) ] ) . run ( self , state_persister = InMemoryStatePersister ( ) ) #NEWLINE# self . failureResultOf ( d , FirstError ) #NEWLINE# failures = logger . flush_tracebacks ( ZeroDivisionError ) #NEWLINE# self . assertEqual ( 3 , len ( failures ) )