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

Skip to content

fill_between_2d tests are testing the wrong thing #8698

Closed
@anntzer

Description

@anntzer

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions