def main(): """ Main function """ system = SolarSystem(3600, 11.5517 * 10**3, Options.PROBE_RUN, "CelestialObjects") animate = Animation(system) animate.plot()
def test_plot_show(self, mock): """Test to prove that plt.show is called in plot() method. Uses mocking """ self.system_probe = SolarSystem(3600, 10000, Options.PROBE_RUN, "CelestialObjects") animate = Animation(self.system_probe) animate.plot() mock.assert_called()
def test_plot_animate(self, mock, mock2): """Test used to check that a FunCAnimator is used in plot() Uses mocking """ mock.return_value = None self.system_probe = SolarSystem(3600, 10000, Options.PROBE_RUN, "CelestialObjects") animate = Animation(self.system_probe) animate.plot() mock.assert_called()
def test_animate_update(self, mock, mock2): """Test used to prove that update beeman is calld in the animate method Uses mocking. """ self.system_probe = SolarSystem(3600, 10000, Options.PROBE_RUN, "CelestialObjects") animate = Animation(self.system_probe) animate.plot() animate.init() animate.animate(0) mock.assert_called()