def test_axes_object_with_ax(): fig = figure.Figure() ax = fig.add_subplot(1, 1, 1) fig1, ax1 = validate.axes_object(ax) assert isinstance(ax1, axes.Axes) assert isinstance(fig1, figure.Figure) assert ax1 is ax assert fig1 is fig
def test_axes_object_with_ax(): fig = figure.Figure() ax = fig.add_subplot(1, 1, 1) fig1, ax1 = validate.axes_object(ax) assert isinstance(ax1, axes.Axes) assert isinstance(fig1, figure.Figure) assert ax1 is ax assert fig1 is fig
def test_axes_object_with_None(): fig1, ax1 = validate.axes_object(None) assert isinstance(ax1, axes.Axes) assert isinstance(fig1, figure.Figure)
def test_axes_object_invalid(): with raises(ValueError): validate.axes_object("junk")
def test_axes_object_invalid(): with pytest.raises(ValueError): validate.axes_object('junk')
def test_axes_object_invalid(): with pytest.raises(ValueError): validate.axes_object('junk')
def test_axes_object_with_None(): fig1, ax1 = validate.axes_object(None) assert isinstance(ax1, axes.Axes) assert isinstance(fig1, figure.Figure)