def test_set_frame_plots_same_colors(): op = plot_solar_system() jupiter = Orbit.from_body_ephem(Jupiter) op.plot(jupiter) colors1 = [orb[2] for orb in op._orbits] op.set_frame(*jupiter.pqw()) colors2 = [orb[2] for orb in op._orbits] assert colors1 == colors2
def test_plot_solar_system(outer, expected): assert len(plot_solar_system(outer).orbits) == expected assert isinstance(plot_solar_system(), OrbitPlotter)
def test_redraw_makes_attractor_none(): op = plot_solar_system() op._redraw() assert op._attractor_radius is not None
def test_plot_solar_system(outer, expected): assert len(plot_solar_system(outer).orbits) == expected assert isinstance(plot_solar_system(), OrbitPlotter)