Skip to content

fill_between_2d tests are testing the wrong thing #8698

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
anntzer opened this issue Jun 1, 2017 · 1 comment · Fixed by #8729
Closed

fill_between_2d tests are testing the wrong thing #8698

anntzer opened this issue Jun 1, 2017 · 1 comment · Fixed by #8729
Milestone

Comments

@anntzer
Copy link
Contributor

anntzer commented Jun 1, 2017

test_axes.py contains a few tests of the form

def test_fill_between_2d_x_input():
    x = np.zeros((2, 2))
    y1 = 3
    y2 = 3

    fig = plt.figure()
    ax = fig.add_subplot(211)
    with pytest.raises(ValueError):
        ax.plot(x, y1, x, y2, color='black')
        ax.fill_between(x, y1, y2)

and similarly for fill_betweenx. The ValueError actually gets raised by plot, not by fillbetween, which is almost certainly not the intent. In any case, this should be easily fixable by getting rid of the call to plot. The tests could probably be parametrized as well.

@tacaswell tacaswell added this to the 2.2 (next next feature release) milestone Jun 2, 2017
@tacaswell
Copy link
Member

Exact work:

Marked as new contributor friendly because it can be done understanding pytest but not the Matplotlib code base.

@QuLogic QuLogic modified the milestones: needs sorting, v2.2.0 Feb 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants