Пример #1
0
 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)
Пример #2
0
 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)
Пример #3
0
 def test_rodar_nao_retornando_erro_de_KeyboardInterrupt(self, mock, *_):
     mock.side_effect = [KeyboardInterrupt()]
     main('')
     self.assertEqual(mock.call_count, 1)
Пример #4
0
 def test_rain_chamado(self, mock, *_):
     main('')
     mock.assert_any_call()
Пример #5
0
 def test_arquiteto_chamado(self, mock, *_):
     main('')
     self.assertEqual(mock.call_count, 1)
Пример #6
0
from sys import argv

from src.matrix import main

if __name__ == '__main__':
    main(' '.join(argv[1:]))