Ejemplo n.º 1
0
def test_Whisker():
    whisker = Whisker()
    assert whisker.plot is None
    assert whisker.level == 'underlay'
    assert whisker.lower is None
    assert whisker.lower_units == 'data'
    assert isinstance(whisker.lower_head, ArrowHead)
    assert whisker.lower_head.size == 10
    assert whisker.lower_head.level == 'underlay'
    assert whisker.upper is None
    assert whisker.upper_units == 'data'
    assert isinstance(whisker.upper_head, ArrowHead)
    assert whisker.upper_head.size == 10
    assert whisker.upper_head.level == 'underlay'
    assert whisker.base is None
    assert whisker.dimension == 'height'
    assert isinstance(whisker.source, ColumnDataSource)
    assert whisker.x_range_name == 'default'
    assert whisker.y_range_name == 'default'
    check_line_properties(whisker, "")
    check_properties_existence(whisker, [
        "plot", "visible", "level", "lower", "lower_units", "lower_head",
        "upper", "upper_units", "upper_head", "base", "base_units",
        "dimension", "source", "x_range_name", "y_range_name"
    ], LINE)
Ejemplo n.º 2
0
def test_Whisker_and_Band_accept_negative_values():
    whisker = Whisker(base=-1., lower=-1.5, upper=-0.5)
    assert whisker.base == -1.
    assert whisker.lower == -1.5
    assert whisker.upper == -0.5
    band = Band(base=-1., lower=-1.5, upper=-0.5)
    assert band.base == -1.
    assert band.lower == -1.5
    assert band.upper == -0.5