Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MNT]: add tests for nargs_error #25864

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

Closed
story645 opened this issue May 11, 2023 · 1 comment · Fixed by #25891
Closed

[MNT]: add tests for nargs_error #25864

story645 opened this issue May 11, 2023 · 1 comment · Fixed by #25891
Labels
Good first issue Open a pull request against these issues if there are no active ones! Maintenance
Milestone

Comments

@story645
Copy link
Member

story645 commented May 11, 2023

Add tests that check that nargs_error gets raised correctly for legend, stem, pcolorfast, and cycler from #25863. It's a good first issue since the conditions that should trigger the error can be ported to the tests.

@story645 story645 added Good first issue Open a pull request against these issues if there are no active ones! Maintenance labels May 11, 2023
@turnipseason
Copy link
Contributor

Hi! I wanted to try this out to practice writing tests. I haven't really done it before, so I wanted to ask before proceeding. Should it look something like this?

def test_nargs_stem():
    import matplotlib.pyplot as plt
    import numpy as np

    with pytest.raises(TypeError):
        x = np.linspace(0.1, 2 * np.pi, 41)
        y = np.exp(np.sin(x))

        plt.stem(x, 123, 434, y)

Thanks in advance :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good first issue Open a pull request against these issues if there are no active ones! Maintenance
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants