Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test plotting: assert each axes has 2 lines #31

Open
github-actions bot opened this issue Jul 21, 2023 · 0 comments
Open

test plotting: assert each axes has 2 lines #31

github-actions bot opened this issue Jul 21, 2023 · 0 comments

Comments

@github-actions
Copy link

https://api.github.com/giocaizzi/py3dinterpolations/blob/4544c573a8e987c599122c5a0906450b7e2bfa18/tests/plotting/test_plotting.py#L43

    ).preprocess()

    # patch the reverse_preprocessing function
    # returning  a GriddData object
    # created with a sample of the test_data
    with patch(
        "py3dinterpolations.plotting.plotting.reverse_preprocessing",
        return_value=GridData(test_data.sample(n=50, random_state=42)),
    ):
        fig = plot_downsampling(gd, preprocessed_gd)

    # assert is figure
    assert isinstance(fig, Figure)

    # assert figure has n visible axes
    n = len(gd.data.index.get_level_values("ID").unique())
    visible_axes = [ax for ax in fig.axes if ax.get_visible()]
    assert len(visible_axes) == n

    # # TODO assert each axes has 2 lines
@github-actions github-actions bot added the todo label Jul 21, 2023
@giocaizzi giocaizzi changed the title assert each axes has 2 lines test plotting: assert each axes has 2 lines Jul 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant