def test_texto_efeito_pausa_chamado_com_argumentos(self, mock2, *_): main('') esperado = [ call('Conectando a matrix...'), call(attr(0) + '\nDesconectado.') ] self.assertEqual(mock2.mock_calls, esperado)
def test_rodar_nao_retornando_erro_de_KeyboardInterrupt_2( self, condicoes, rodar, *_): rodar.side_effect = [KeyboardInterrupt()] * 3 + [0] main('') self.assertEqual(condicoes.call_count, 4)
def test_rodar_nao_retornando_erro_de_KeyboardInterrupt(self, mock, *_): mock.side_effect = [KeyboardInterrupt()] main('') self.assertEqual(mock.call_count, 1)
def test_rain_chamado(self, mock, *_): main('') mock.assert_any_call()
def test_arquiteto_chamado(self, mock, *_): main('') self.assertEqual(mock.call_count, 1)
from sys import argv from src.matrix import main if __name__ == '__main__': main(' '.join(argv[1:]))