Пример #1
0
def test_save_saves_plot(mock_save, dummy_data):
    geodesic = dummy_data
    cl = InteractiveGeodesicPlotter()
    cl.plot(geodesic)
    name = "test_plot.png"
    cl.save(name)
    basename, ext = os.path.splitext(name)
    mock_save.assert_called_with(
        cl.fig, image=ext[1:], image_filename=basename, show_link=False
    )
Пример #2
0
def test_interactive_geod_plotter_saves_plot(mock_save, dummy_geod):
    geod = dummy_geod
    igpl = InteractiveGeodesicPlotter()
    igpl.plot(geod)
    name = "test_plot.png"
    igpl.save(name)
    basename, ext = os.path.splitext(name)

    mock_save.assert_called_with(
        igpl.fig, image=ext[1:], image_filename=basename, show_link=False
    )