Esempio n. 1
0
    def test_energy_graph_show(self, mock):
        """Test used to check that plt.show is called within the energy_graph method
        Uses mocking

        """
        Animation.energy_graph_comparisson(100)
        mock.assert_called_once()
Esempio n. 2
0
 def test_energy_graph_update(self, mock, mock2, mock3, mock4):
     """Test used to verify thst the methods update_beeman and
     update euler are called the right number of times in the energy_graph
     method.
     Uses mocking
     """
     Animation.energy_graph_comparisson(100)
     self.assertEqual(100, mock.call_count)
     self.assertEqual(100, mock2.call_count)
     mock3.assert_called_once()