Exemplo n.º 1
0
 def test_run_does_nothing_when_finished(self, mock_parse_parameter,
                                         mock_add):
     mock_parse_parameter.return_value = (1, [])
     computer = IntComputer([])
     computer.finished = True
     computer.run()
     assert mock_add.called == False
Exemplo n.º 2
0
 def test_run_finishes_on_opcode_99(self, mock_parse_parameter):
     mock_parse_parameter.return_value = (99, [])
     computer = IntComputer([])
     assert computer.finished == False
     computer.run()
     computer.finished = True