コード例 #1
0
def main():
    """
    Main function
    """
    system = SolarSystem(3600, 11.5517 * 10**3, Options.PROBE_RUN,
                         "CelestialObjects")
    animate = Animation(system)
    animate.plot()
コード例 #2
0
ファイル: test_animate.py プロジェクト: pmorande27/Solar.py
 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()
コード例 #3
0
ファイル: test_animate.py プロジェクト: pmorande27/Solar.py
    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()
コード例 #4
0
ファイル: test_animate.py プロジェクト: pmorande27/Solar.py
 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()