Esempio n. 1
0
def test_Band():
    band = Band()
    assert band.plot is None
    assert band.level == 'annotation'
    assert band.lower is None
    assert band.lower_units == 'data'
    assert band.upper is None
    assert band.upper_units == 'data'
    assert band.base is None
    assert band.dimension == 'height'
    assert isinstance(band.source, ColumnDataSource)
    assert band.x_range_name == 'default'
    assert band.y_range_name == 'default'
    check_line_properties(band, "", "#cccccc", 1.0, 0.3)
    check_fill_properties(band, "", "#fff9ba", 0.4)
    check_properties_existence(band, [
        "plot",
        "visible",
        "level",
        "lower",
        "lower_units",
        "upper",
        "upper_units",
        "base",
        "base_units",
        "dimension",
        "source",
        "x_range_name",
        "y_range_name",
    ], LINE, FILL)
Esempio 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