def METHOD_NAME(self, ax, segments):
    c = ax.plot_segmentlist(segments)
    assert isinstance(c, PatchCollection)
    assert numpy.isclose(ax.dataLim.x0, 0.)
    assert numpy.isclose(ax.dataLim.x1, 7.)
    assert len(c.get_paths()) == len(segments)
    assert ax.get_epoch() == segments[0][0]
    # test y
    p = ax.plot_segmentlist(segments).get_paths()[0].get_extents()
    assert p.y0 + p.height/2. == 1.
    p = ax.plot_segmentlist(segments, y=8).get_paths()[0].get_extents()
    assert p.y0 + p.height/2. == 8.
    # test kwargs
    c = ax.plot_segmentlist(segments, label='My segments',
                            rasterized=True)
    assert c.get_label() == 'My segments'
    assert c.get_rasterized() is True
    # test collection=False
    c = ax.plot_segmentlist(segments, collection=False, label='test')
    assert isinstance(c, list)
    assert not isinstance(c, PatchCollection)
    assert c[0].get_label() == 'test'
    assert c[1].get_label() == ''
    assert len(ax.patches) == len(segments)
    # test empty
    c = ax.plot_segmentlist(type(segments)())